Home / Forums / WoodMart support forum / Dynamic discount issues and feature requests
Home › Forums › WoodMart support forum › Dynamic discount issues and feature requests
Dynamic discount issues and feature requests
- This topic has 4 replies, 2 voices, and was last updated 3 months, 3 weeks ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
March 13, 2026 at 7:00 pm #712494
metuzaParticipantHello,
I have just replaced YITH dynamic pricing with Woodmart dynamic discounts and so far it looks very good for the use we have, but i have found a few issues and future problems using it:
1. When i am using a coupon code set to disabled for onsale products i get the success message “coupon was added successfully” and in order total box i get “Discount (coupon name): kr 0.00 X”. So a little confusing for customers as they normally should see a message telling that coupon can not be used on these products.
2. The very best behavior should be to disable the dynamic discount whenever and coupon code is used as normally a coupon code has a better discount than normally given as dynamic discount/quantity discount. Atleast make it an option to disable dynamic discount if an coupon code is used.
3. There should also be an option to disable dynamic discounts for onsale products. This has to be added on per rule basis as some rules might have a little discount and causing no big losses.
As i see it for now the biggest problem is the coupn code not overwriting the dynamic discount. Problems with ie. onsale products i can solve by giving them a tag or attribute.
Brgds
RuneMarch 13, 2026 at 9:31 pm #712515
metuzaParticipantHi again,
I was able to solve the onsale and coupon code problem using the below filter:
function afas_disable_dynamic_pricing( $price, $cart_item ) { $saleprice = get_post_meta( $cart_item['product_id'], '_sale_price', true ); if ( $saleprice > 0 || ( is_object( WC()->cart ) && count( WC()->cart->get_applied_coupons() ) > 0 ) ) { $price = 0; } return $price; } add_filter( 'woodmart_pricing_before_calculate_discounts', 'afas_disable_dynamic_pricing', 99, 2 );Now i just have to find a way to hide the quantity discount table from onsale products.
Brgds
RuneMarch 14, 2026 at 11:10 am #712560Hello,
Can you please share the page URL so I can give you the possible solution after checking the page.
Best Regards.
March 14, 2026 at 12:37 pm #712579
metuzaParticipantHello,
I could not find any usable filters to hide the quantity table so i have added a code with the conditions needed and hiding the table using inline css and that seems to work just fine.
I was not able to post the solution here because of wordfence blocked me.
Brgds
RuneMarch 14, 2026 at 1:08 pm #712584Hello,
Thank you for the update and for sharing your workaround.
Wordfence may sometimes block posts that contain code snippets because they can be detected as potentially unsafe content by its firewall rules.
If you would like, you can also share the snippet through a paste service and provide the link here so other users facing the same situation can benefit from your solution.
We also appreciate your feedback regarding the dynamic discounts behavior with coupons and on-sale products. I will pass these suggestions to our development team for consideration in future updates.
Best Regards.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register