I have a product $productPrice = $12.00

Is it possible if productQuantity = 12 would be $productPrice = $99.00

Please let me know this thing is possible

Thanks


Solution:

I can make it work with this hook

add_action( 'woocommerce_before_calculate_totals', 'cp_add_custom_price' );

you can do as much customization you need want to custom price based on quantity with the above hook

$value['data']->price = $customPrice;

based on my requirement I have calculated $customPrice while adding 12 product in cart.


Related Wordpress search:

, , , ,

Wordpress related questions and answers: