This is simply a list of product data-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes.
wmodes/get-product-properties
- Parameters:
- $properties array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_properties( $properties, $product, $variation ) { //add your custom code here return $properties; } add_filter( 'wmodes/get-product-properties', 'custom_get_product_properties', 10, 3 );
wmodes/get-product-prices
- Parameters:
- $prices array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_prices( $prices, $product, $variation ) { //add your custom code here return $prices; } add_filter( 'wmodes/get-product-prices', 'custom_get_product_prices', 10, 3 );
wmodes/get-product-stock-data
- Parameters:
- $stock_data array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_stock_data( $stock_data, $product, $variation ) { //add your custom code here return $stock_data; } add_filter( 'wmodes/get-product-stock-data', 'custom_get_product_stock_data', 10, 3 );
wmodes/get-product-category-ids
- Parameters:
- $category_ids array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_category_ids( $category_ids, $product, $variation ) { //add your custom code here return $category_ids; } add_filter( 'wmodes/get-product-category-ids', 'custom_get_product_category_ids', 10, 3 );
wmodes/get-product-tag-ids
- Parameters:
- $tag_ids array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_tag_ids( $tag_ids, $product, $variation ) { //add your custom code here return $tag_ids; } add_filter( 'wmodes/get-product-tag-ids', 'custom_get_product_tag_ids', 10, 3 );
wmodes/get-product-attribute-ids
- Parameters:
- $attribute_ids array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_attribute_ids( $attribute_ids, $product, $variation ) { //add your custom code here return $attribute_ids; } add_filter( 'wmodes/get-product-attribute-ids', 'custom_get_product_attribute_ids', 10, 3 );
wmodes/get-product-taxes
- Parameters:
- $taxes array()
- $product_data array()
- $cart array()
Example Codes:
function custom_get_product_taxes( $taxes, $product_data, $cart ) { //add your custom code here return $taxes; } add_filter( 'wmodes/get-product-taxes', 'custom_get_product_taxes', 10, 3 );
wmodes/get-product-shipping-class-id
- Parameters:
- $shipping_class_id array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_shipping_class_id( $shipping_class_id, $product, $variation ) { //add your custom code here return $shipping_class_id; } add_filter( 'wmodes/get-product-shipping-class-id', 'custom_get_product_shipping_class_id', 10, 3 );
wmodes/get-product-weight
- Parameters:
- $weight array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_weight( $weight, $product, $variation ) { //add your custom code here return $weight; } add_filter( 'wmodes/get-product-weight', 'custom_get_product_weight', 10, 3 );
wmodes/get-product-dimensions
- Parameters:
- $dimensions array()
- $product array()
- $variation array()
Example Codes:
function custom_get_product_dimensions( $dimensions, $product, $variation ) { //add your custom code here return $dimensions; } add_filter( 'wmodes/get-product-dimensions', 'custom_get_product_dimensions', 10, 3 );
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article