Last active
February 24, 2022 16:49
-
-
Save dparker1005/a0e73029784d87e53a522539bd969c41 to your computer and use it in GitHub Desktop.
Make sure that PMPro loads the Stripe library first if other plugins are loading outdated versions on every page load.
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 | |
/** | |
* Make sure that PMPro loads the Stripe library first if other plugins are loading outdated | |
* versions on every page load. This is a blunt way to address the conflict and should be used | |
* with caution. | |
* | |
* To use, add as a new file in your site's `wp-content/mu-plugins/` folder. | |
*/ | |
if ( file_exists( dirname( __FILE__ ) . "/../plugins/paid-memberships-pro/includes/lib/Stripe/init.php" ) && ! class_exists( "Stripe\Stripe" ) ) { | |
require_once( dirname( __FILE__ ) . "/../plugins/paid-memberships-pro/includes/lib/Stripe/init.php" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment