Skip to content

Instantly share code, notes, and snippets.

@wpfullstripe
Created June 14, 2019 17:13
Show Gist options
  • Save wpfullstripe/f270e1afaea645fd8466a4f4d595ea3d to your computer and use it in GitHub Desktop.
Save wpfullstripe/f270e1afaea645fd8466a4f4d595ea3d to your computer and use it in GitHub Desktop.
<?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