Last active
April 14, 2022 06:03
-
-
Save AnanthFlycart/83273b78200e416ec0a0f081f351c724 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Fix - Dynamic Strikeout not Update during Add to Cart (Ajax) in Product page | |
| add_action('wp_footer', function () { | |
| if (function_exists('is_product') && is_product()) { | |
| ?> | |
| <script> | |
| jQuery(function($) { | |
| $(document.body).on('added_to_cart removed_from_cart wc_fragments_refreshed', function() { | |
| $('[name="quantity"]').trigger('change'); | |
| }); | |
| }); | |
| </script> | |
| <?php | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment