Created
February 20, 2025 11:02
-
-
Save grantalltodavid/b4f39e3b9353f1df70aaf9f377ec13bc to your computer and use it in GitHub Desktop.
Sliced Invoices: PayPal Gateway change NOSHIPPING parameter from 1 to 0
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
| <?php | |
| add_action( 'setted_transient', 'si20250220_change_paypal_params', 10, 3 ); | |
| function si20250220_change_paypal_params( $transient, $value, $expiration ) { | |
| if ( strpos( $transient, 'sliced_paypal_' ) === 0 && strpos( $value, 'NOSHIPPING=1' ) !== false ) { | |
| $value = str_replace( 'NOSHIPPING=1', 'NOSHIPPING=0', $value ); | |
| set_transient( $transient, $value, 60*60*24 ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment