woocommerce_api_product_categories_response

woocommerce_api_product_categories_response

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_product_categories_response') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 571
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
            foreach ( $terms as $term_id ) {
                $product_categories[] = current( $this->get_product_category( $term_id, $fields ) );
            }
     
            return array( 'product_categories' => apply_filters( 'woocommerce_api_product_categories_response', $product_categories, $terms, $fields, $this ) );
        } catch ( WC_API_Exception $e ) {
            return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
        }
    }
     
    /**
  • /includes/legacy/api/v3/class-wc-api-products.php line 630
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
            foreach ( $terms as $term_id ) {
                $product_categories[] = current( $this->get_product_category( $term_id, $fields ) );
            }
     
            return array( 'product_categories' => apply_filters( 'woocommerce_api_product_categories_response', $product_categories, $terms, $fields, $this ) );
        } catch ( WC_API_Exception $e ) {
            return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
        }
    }
     
    /**