Created
August 13, 2015 13:17
-
-
Save lucasstark/d954b16f8aad6cc87c21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_dynamic_pricing_is_cumulative', 'wcdp_cumulative_pricing', 10, 2 ); | |
function wcdp_cumulative_pricing( $cumulative, $module_id ) { | |
if ( $module_id == 'simple_category' || $module_id == 'simple_membership' ) { | |
$cumulative = false; | |
} | |
return $cumulative; | |
} | |
add_filter('wc_dynamic_pricing_load_modules', 'custom_dynamic_pricing_module_order'); | |
function custom_dynamic_pricing_module_order($modules) { | |
$modules = array(); | |
$modules['advanced_category'] = WC_Dynamic_Pricing_Advanced_Category::instance(); | |
$modules['simple_product'] = WC_Dynamic_Pricing_Simple_Product::instance(); | |
$modules['simple_membership'] = WC_Dynamic_Pricing_Simple_Membership::instance(); | |
$modules['simple_category'] = WC_Dynamic_Pricing_Simple_Category::instance(); | |
//Move advanced product below simple membership | |
$modules['advanced_product'] = WC_Dynamic_Pricing_Advanced_Product::instance(); | |
$modules['advanced_totals'] = WC_Dynamic_Pricing_Advanced_Totals::instance(); | |
return $modules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment