Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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