Skip to content

Commit

Permalink
update: product category api controller
Browse files Browse the repository at this point in the history
  • Loading branch information
osmansufy committed Jan 13, 2025
1 parent 068ac08 commit 20b746a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/REST/ProductCategoriesVendorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

use WeDevs\Dokan\Abstracts\DokanRESTVendorController;
use WP_Error;
use WP_REST_Request;
use WP_REST_Server;
use WP_Term;

class ProductCategoriesVendorController extends DokanRESTVendorController {

Expand Down Expand Up @@ -107,7 +109,7 @@ public function get_product_categories( $request ) {
* @param WP_REST_Request $request Request object.
* @return array Formatted category data.
*/
protected function prepare_category_for_response( $category, $request ) {
protected function prepare_category_for_response( $category, $request ): array {
$thumbnail_id = get_term_meta( $category->term_id, 'thumbnail_id', true );
$thumbnail_url = $thumbnail_id ? wp_get_attachment_url( $thumbnail_id ) : '';

Expand Down

0 comments on commit 20b746a

Please sign in to comment.