Strikeout is not update after page loaded in product page

Update strike-through pricing dynamically on the product page.

 add_action('wp_footer', function () {
        if (function_exists('is_product') && is_product()) {
                ?>
        <script>
            jQuery(function($) {
                $( document ).ready(function() {
                    $('[name="quantity"]').trigger('change');
                });
            });
        </script>
            <?php
        }
    });