Last active
August 19, 2022 14:56
-
-
Save InpsydeNiklas/0e44ab66ab39f232591686d048a0e32e to your computer and use it in GitHub Desktop.
Exclude PayPal Payments scripts from JavaScript Minification (Frontend Optimization) in the SiteGround Optimizer plugin. Only relevant on SiteGround-hosted websites on PayPal Payments v1.9.2.
This file contains 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
<?php | |
add_filter( | |
'sgo_js_minify_exclude', | |
function ( array $scripts ) { | |
$scripts_to_exclude = array( 'ppcp-smart-button', 'ppcp-oxxo', 'ppcp-pay-upon-invoice', 'ppcp-vaulting-myaccount-payments', 'ppcp-gateway-settings', 'ppcp-webhooks-status-page', 'ppcp-tracking' ); | |
return array_merge( $scripts, $scripts_to_exclude ); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment