Created
June 14, 2019 17:10
-
-
Save wpfullstripe/2c879ace561f241e23a89d495684d43f to your computer and use it in GitHub Desktop.
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 | |
//Stripe PHP library | |
if ( ! class_exists( '\Stripe\Stripe' ) ) { | |
require_once( dirname( __FILE__ ) . '/vendor/stripe/stripe-php/init.php' ); | |
} else { | |
if ( substr( \Stripe\Stripe::VERSION, 0, strpos( \Stripe\Stripe::VERSION, '.' ) ) != substr( WP_FULL_STRIPE_STRIPE_API_VERSION, 0, strpos( WP_FULL_STRIPE_STRIPE_API_VERSION, '.' ) ) ) { | |
$reflector = new ReflectionClass( '\Stripe\Stripe' ); | |
wp_die( plugin_basename( __FILE__ ) . ': ' . __( 'Another plugin has loaded an incompatible Stripe API client. Deactivate all other Stripe plugins, and try to activate Full Stripe again.', 'wp-full-stripe' ) . ' ' . \Stripe\Stripe::VERSION . ' != ' . WP_FULL_STRIPE_STRIPE_API_VERSION . ', ' . $reflector->getFileName() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment