lundi 20 avril 2015

I am using woocommerce-composite-products (plugin). i want to Apply component-level discounts over sale prices?

In woocommerce-composite-products (plugin) i want apply discount based on sales price. by default it calculate by regular price.

as per woo documentation I can use filter woocommerce_composited_product_discount_from_regular. my code is below

add_filter( 'woocommerce_composited_product_discount_from_regular', 'wc_cp_composited_product_discount_from_regular', 10, 3 );


function wc_cp_composited_product_discount_from_regular( $from_regular, $component_id, $composite_id ) {
return false;
}

I tired to add this code in plugin and add in wp theme but it working.

can anyone help me ?

Aucun commentaire:

Enregistrer un commentaire