*/ class AngellEYE_PayPal_For_Divi_Store_Setting_Class { /** * Hook in methods * @since 0.1.0 * @access static */ public static function init() { add_action('angelleye_paypal_for_divi_store_setting', array(__CLASS__, 'angelleye_paypal_for_divi_store_setting')); } /** * angelleye_paypal_for_divi_store_setting function used for submit form of settings * @since 1.0.0 * @access public */ public static function angelleye_paypal_for_divi_store_setting() { $angelleye_bm_install=false; $angelleye_bm_plugin_activate=false; $plugins = array_keys(get_plugins()); if(in_array('paypal-wp-button-manager/paypal-wp-button-manager.php',$plugins)){ $angelleye_bm_install=true; if (is_plugin_active('paypal-wp-button-manager/paypal-wp-button-manager.php')) { $angelleye_bm_plugin_activate=true; } } $message=''; $button=''; if($angelleye_bm_install==false && $angelleye_bm_plugin_activate==false){ $message= "Install the PayPal WP Button Manager plugin for a more advanced PayPal button manager that is fully compatible with PayPal for Divi."; $slug = 'paypal-wp-button-manager'; $install_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $slug), 'install-plugin_' . $slug); $button= sprintf('%1$s',esc_html('Install Now','angelleye_paypal_divi'),esc_url($install_url)); } else if($angelleye_bm_install==true && $angelleye_bm_plugin_activate==false){ $message= "Activate the PayPal WP Button Manager plugin if you would like to use it to manage PayPal buttons in WordPress."; $button= sprintf('%1$s', esc_html('Activate','angelleye_paypal_divi'),AngellEYE_PayPal_For_Divi_Store_Setting_Class::na_action_link('paypal-wp-button-manager/paypal-wp-button-manager.php')); } else if($angelleye_bm_install==true && $angelleye_bm_plugin_activate==true){ $message=''; $button= sprintf('%1$s', esc_html('Installed','angelleye_paypal_divi')); } ?>