} // Admin notice and stop execution if Pro plugin found. add_action('plugins_loaded', 'simpay_pro_plugin_check'); function simpay_pro_plugin_check() { if (class_exists('Stripe_Checkout_Pro') || class_exists('Simple_Pay_Pro')) { add_action('admin_notices', 'simpay_pro_active_notice'); return; } } function simpay_pro_active_notice() { echo '<div class="error"><p>' . __('Simple Pay Lite and Pro cannot be active simultaneously. Please deactivate one of them to proceed.', 'stripe') . '</p></div>'; } // Plugin requirements class. require_once 'classes/wp-requirements.php'; // Check plugin requirements before loading plugin. $this_plugin_checks = new SimPay_WP_Requirements('WP Simple Pay Lite for Stripe', plugin_basename(__FILE__), array('PHP' => '5.3.3', 'WordPress' => '4.2', 'Extensions' => array('curl', 'json', 'mbstring'))); if ($this_plugin_checks->pass() === false) { $this_plugin_checks->halt(); return; } // Load the plugin main class. require_once SC_DIR_PATH . 'classes/class-stripe-checkout-shared.php'; // Register hook that is fired when the plugin is activated. register_activation_hook(SC_PLUGIN_FILE, array('Stripe_Checkout', 'activate')); // Create a global instance of our main class for this plugin so we can use it throughout all the other classes. global $base_class; // Let's get going finally! $base_class = Stripe_Checkout::get_instance();
* @wordpress-plugin * Plugin Name: Simple Stripe Checkout * Plugin URI: http://wpstripe.net * Description: Add a Stripe Checkout form overlay to your site in minutes using shortcodes. * Version: 1.2.9 * Author: Phil Derksen * Author URI: http://philderksen.com * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * GitHub Plugin URI: https://github.com/pderksen/WP-Stripe-Checkout * Text Domain: sc * Domain Path: /languages/ */ // Exit if accessed directly. if (!defined('ABSPATH')) { exit; } if (!defined('SC_MAIN_FILE')) { define('SC_MAIN_FILE', __FILE__); } if (!defined('SC_PATH')) { define('SC_PATH', plugin_dir_path(__FILE__)); } if (!defined('SC_URL')) { define('SC_URL', plugins_url('', __FILE__) . '/'); } require_once plugin_dir_path(__FILE__) . 'class-stripe-checkout.php'; // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively. register_activation_hook(__FILE__, array('Stripe_Checkout', 'activate')); Stripe_Checkout::get_instance();
/** * Disables opengraph tags to avoid conflicts with WP SEO by Yoast * * @since 1.2.0 */ function sc_disable_seo_og() { $sc_payment_details = Stripe_Checkout::get_instance()->session->get('sc_payment_details'); if ($sc_payment_details['show'] == true) { remove_action('template_redirect', 'wpseo_frontend_head_init', 999); } }