1. Home
  2. Knowledge Base
  3. WooCommerce Fees and Discounts
  4. Include variations in ‘Products’ rule
  1. Home
  2. Knowledge Base
  3. Variations
  4. Include variations in ‘Products’ rule
  1. Home
  2. Knowledge Base
  3. Dynamic Pricing
  4. Include variations in ‘Products’ rule

Include variations in ‘Products’ rule

If you would like to define pricing rules that are specific to variations, add this snippet:

<?php
/**
* Include variations in products rule
*/
function prefix_search_products_method( $method, $args ) {
return 'woocommerce_json_search_products_and_variations';
}
add_filter( 'wcfad_search_products_method', 'prefix_search_products_method', 10, 2 );

Was this article helpful?

Need More Support?

If you can't find the answer that you're looking for, then please use the link below to raise a support ticket.
Contact Support

Related Articles