Created
October 30, 2025 08:51
-
-
Save xlplugins/86f4f79f620abe3ccc1fce39529568c7 to your computer and use it in GitHub Desktop.
Fix WFACP Shimmer Animation on Shipping Method Change
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
| add_action('wfacp_internal_css', function() { | |
| ?> | |
| <script type="text/javascript"> | |
| (function($) { | |
| 'use strict'; | |
| // Enable shimmer animation trigger for shipping method changes | |
| function enableShimmerTrigger() { | |
| if (window.refresh_page_data_load_trigger === false) { | |
| window.refresh_page_data_load_trigger = true; | |
| $('body').removeClass('wfacp_do_not_show_block'); | |
| } | |
| } | |
| // Single delegated event listener for all shipping-related interactions | |
| $(document.body).on('change click', 'input[name^="shipping_method"], .wfacp_shipping_table input, .wfacp_shipping_table label', enableShimmerTrigger); | |
| })(jQuery); | |
| </script> | |
| <?php | |
| }, 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment