/**
 * Remove plugin activation banners pragmatically
 *
 * @description: This will remove the Give Core welcome and Add-on activation banners which display on the plugin list page. If you are using WP Multisite place this functionality in a plugin that's activated network wide to have it take effect on all sites in the network.
 *
 */
function remove_give_activation_stuff()
{
    if (class_exists('Give_Welcome') && function_exists('give_update_option')) {
        give_update_option('disable_welcome', 'on');
    }
    //Remove Strip Add-on activation banner
    remove_action('admin_init', 'give_stripe_activation_banner');
    //Add other remove_actions here...
}
Example #2
0
 /**
  * Test that the give_register_styles() function will enqueue the styles.
  *
  * @since 1.0
  */
 public function test_register_styles()
 {
     give_update_option('disable_css', false);
     give_register_styles();
     $this->assertTrue(wp_style_is('give-styles', 'enqueued'));
 }
 /**
  * Create בolumns
  *
  * Create the necessary columns for email access
  *
  * @since  1.0
  * @access public
  *
  * @return void
  */
 public function create_columns()
 {
     global $wpdb;
     //Create columns in customers table
     $query = $wpdb->query("ALTER TABLE {$wpdb->prefix}give_customers ADD `token` VARCHAR(255) CHARACTER SET utf8 NOT NULL, ADD `verify_key` VARCHAR(255) CHARACTER SET utf8 NOT NULL AFTER `token`, ADD `verify_throttle` DATETIME NOT NULL AFTER `verify_key`");
     //Columns added properly
     if ($query) {
         give_update_option('email_access_installed', 1);
     }
 }