Created
May 19, 2020 11:17
-
-
Save AshlinRejo/6a2f0320d0baa30dcb2cb148f2b6ce71 to your computer and use it in GitHub Desktop.
Discount rules v2: Change the dynamic strikeout class target
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('advanced_woo_discount_rules_custom_target_for_simple_product_on_qty_update', function ($target){ | |
$target = 'div.product div.price'; | |
return $target; | |
}, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Ashlin and thank you for your snippet.
In combination with your other snippet to replace site_main.js and a small tweak to the snippet above, I've managed to get the desired result.
Your modified site_main.js script first searches in the form, but it needs to search for
p.price
directly asdiv.product
is a parent of the form.Thank you for all your time and effort.