Nevermind, it’s:
<?php wp_dequeue_script('simpay-block-button'); ?>
Follow up question: why isn’t simpay_before_register_public_scripts
working?
I had been using it to disable all the scripts loaded by this plugin, but it did not prevent simpay-block-button
and all of its dependencies from loading.
Hello @specialk,
Thank you for the report. We are aware of this unintended side effect of the new button block support in the latest version of WP Simple Pay. We will be releasing a fix shortly that ensures the script is only loaded when the block editor is loaded.
simpay_before_register_public_scripts
will not be needed as the script only needs to load in the admin when using the block editor.
Sorry for the inconvenience; we will have this resolved as soon as possible!
This issue has been resolved in version 4.4.7.1
.
Thank you!
Hey follow up question: are these still valid or necessary to disable simpay scripts:
wp_dequeue_script('simpay-stripe-js-v3');
wp_dequeue_script('simpay-polyfill');
wp_dequeue_script('simpay-accounting');
wp_dequeue_script('simpay-shared');
wp_dequeue_script('simpay-public');
..or will simpay_before_register_public_scripts
take care of all those scripts?
@specialk I would recommend filtering simpay_before_register_public_scripts
to remove the script handles you do not want to load on particular pages. simpay_before_register_public_styles
can be used to exclude CSS assets as well, if needed.
Nevermind, figured it out. Thanks for your help.
-
This reply was modified 2 years, 6 months ago by Jeff Starr.