insights()->init(); } appsero_init_tracker_pre_orders_for_woocommerce(); NS7_RDNC::instance()->add_notification( 152, '9d7bd777a9d8055e', 'https://brightplugins.com' ); final class Bright_Plugins_PFW { /** * @var mixed */ static $instance = null; private function __construct() { $this->init_plugin(); } /** * Initializes a singleton instance * * @since 1.2.7 * @access public * @static * * @return $instance */ public static function init() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Initialize the plugin * * @since 1.2.7 * @access public * * @return void */ /** * @param $item_id * @param $item * @param $order */ /** * @param $item_id * @param $item * @param $order */ public function init_plugin() { // Check if WooCommerce is active if ( defined( 'WC_VERSION' ) ) { $wcpo_bootstrap = Bootstrap::init(); } else { add_action( 'admin_notices', function () { $class = 'notice notice-error'; $message = __( 'Oops! looks like WooCommerce is disabled. Please, enable it in order to use WooCommerce Pre-Orders.', 'pre-orders-for-woocommerce' ); printf( '

%2$s

', esc_attr( $class ), esc_html( $message ) ); } ); } } } // A Custom function for get an preorder option if ( !function_exists( 'bp_preorder_option' ) ) { /** * @param $option * @param $default */ function bp_preorder_option( $option = '', $default = null ) { $options = get_option( 'bp_preorder' ); // Attention: Set your unique id of the framework return ( isset( $options[$option] ) ) ? $options[$option] : $default; } } /** * Initializes the main plugin */ function Bright_Plugins_PFW_start() { return Bright_Plugins_PFW::init(); } register_activation_hook( __FILE__, 'Woocommerce_Preorders\Settings::defaultOptions' ); add_action( 'plugins_loaded', 'Bright_Plugins_PFW_start' );