'Selectika By Image', 'ctl' => 'Complete The Look', 'rdc' => 'Retailer Defined Carousels', 'sps' => 'Selectika Personal Shopper', 'stl' => 'Shop The Look', 'mtl' => 'Maximize The Look', 'fit' => 'Fit Clothes', 'ffs' => 'Fit For Shoes', 'ffk' => 'Fit For Kids', 'tag' => 'Tagging supervisor', ) ); require_once SELECTIKA_PLUGIN_DIR . 'includes/class-selectika.php'; /** * Initialize the plugin. * * @return Selectika|null */ function selectika() { return Selectika::instance(); } add_action( 'plugins_loaded', 'selectika', 5 ); register_activation_hook( __FILE__, 'selectika_activate' ); register_deactivation_hook( __FILE__, 'selectika_deactivate' ); /** * Plugin activation callback. */ function selectika_activate() { require_once SELECTIKA_PLUGIN_DIR . 'includes/class-selectika-catalog.php'; require_once SELECTIKA_PLUGIN_DIR . 'includes/class-selectika-orders.php'; Selectika_Catalog::install(); require_once SELECTIKA_PLUGIN_DIR . 'includes/class-selectika-events.php'; Selectika_Orders::install(); Selectika_Events::install(); Selectika_Catalog::schedule(); update_option( 'selectika_schema_version', SELECTIKA_SCHEMA_VERSION, false ); $defaults = array( 'injection_mode' => 'components_only', 'default_retailer' => '', 'default_lang' => get_bloginfo( 'language' ), 'default_action' => 'sbi', 'auto_inject_product' => array(), 'auto_inject_cart' => array(), 'auto_inject_checkout' => array(), ); if ( false === get_option( 'selectika_options', false ) ) { add_option( 'selectika_options', $defaults ); } } /** * Plugin deactivation callback. */ function selectika_deactivate() { wp_clear_scheduled_hook( 'selectika_catalog_tick' ); wp_clear_scheduled_hook( 'selectika_catalog_continue' ); wp_clear_scheduled_hook( 'selectika_orders_send' ); delete_option( 'selectika_catalog_job' ); delete_option( 'selectika_catalog_lock' ); // Merchant settings and descriptions are preserved for reactivation. } add_action( 'before_woocommerce_init', static function () { if ( class_exists( '\\Automattic\\WooCommerce\\Utilities\\FeaturesUtil' ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } );