'description' => __( 'Number of products.', 'woocommerce' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], ], ], ], ]; } /** * Format data. * * @param array $data Collection data to format and return. * @return array */ public function get_item_response( $data ) { return [ 'price_range' => ! is_null( $data['min_price'] ) && ! is_null( $data['max_price'] ) ? (object) $this->prepare_currency_response( [ 'min_price' => $this->prepare_money_response( $data['min_price'], wc_get_price_decimals() ), 'max_price' => $this->prepare_money_response( $data['max_price'], wc_get_price_decimals() ), ] ) : null, 'attribute_counts' => $data['attribute_counts'], 'rating_counts' => $data['rating_counts'], 'stock_status_counts' => $data['stock_status_counts'], 'taxonomy_counts' => $data['taxonomy_counts'], ]; } }
Warning: Class "Automattic\WooCommerce\StoreApi\Schemas\V1\ProductCollectionDataSchema" not found in /htdocs/wp-content/plugins/woocommerce/src/StoreApi/deprecated.php on line 73

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/ProductCollectionDataSchema.php:1) in /htdocs/wp-includes/pluggable.php on line 1531

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/ProductCollectionDataSchema.php:1) in /htdocs/wp-includes/pluggable.php on line 1534