Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Last active February 24, 2022 16:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dparker1005/a0e73029784d87e53a522539bd969c41 to your computer and use it in GitHub Desktop.
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.
<?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