Heather with BC here! I am thinking that you're right about the script getting triggered on page load, and the quick-view modal may not trigger a page load. If this is the case, you would need to fire an event to trigger the script when the quick-view modal loads, as well. Rather than doing so on the product card itself, but on-load of the modal.
-- UPDATE --
I connected and had a discussion with another BC4WP developer and this is what they suggested for you in this situation.
Overall, being that this is javascript and not be a hook. The trigger is when someone clicks the Quick View Dialog button, when it is clicked, the dialog box is rendered and added to the DOM. The function
in the plugin where this happens lives in:
wp-content/plugins/bigcommerce/assets/js/src/public/buttons/quick-view-dialog.js
The trigger for initSingleDialog is around line 69, when the quick view button is clicked. Consider triggering a custom function on click of the same button that is triggering initSingleDialog. This function could make a call every few miliseconds checking for the existence of the pricing class - once it is there that means it has loaded.
Then run the same checks that are currently working for you. There is likely to be some troubleshooting since multiple dialogs can be initialized and they will all remain part of the DOM, so you may need to make sure the function is checking only for the price class within the dialog that was triggered.
We assume that the .msrp-fix class may be custom to your instance, so the way that classes are referenced may need to be adjusted.
Hopefully this helps out!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…