%s

', __('To use Amazing Fulfillment Integration for WooCommerce it is required that WooCommerce is installed and activated')); } /** * amzFulfillmentActivate * * Plugin activate event */ function amzFulfillmentActivate() { AmzFulfillment_Main::instance()->init(); AmzFulfillment_Logger::debug(AMZFULFILLMENT_PLUGIN_ID . ' activate'); foreach(AmzFulfillment_Main::instance()->data()->repositories() as $repository) { try { $repository->init(); } catch(Exception $e) { AmzFulfillment_Logger::debug(sprintf('%s database table %s initialization failed: %s', AMZFULFILLMENT_PLUGIN_ID, $repository->getTable(), $e->getMessage())); } } } /** * amzFulfillmentDeactivate * * Plugin deactivate event */ function amzFulfillmentDeactivate() { AmzFulfillment_Logger::debug(AMZFULFILLMENT_PLUGIN_ID . ' deactivate'); AmzFulfillment_Main::instance()->clearCrons(); foreach(AmzFulfillment_Main::instance()->data()->repositories() as $repository) { try { $repository->clean(); } catch(Exception $e) { AmzFulfillment_Logger::debug(sprintf('%s database table %s cleanup failed: %s', AMZFULFILLMENT_PLUGIN_ID, $repository->getTable(), $e->getMessage())); } } } /** * amzFulfillmentInit * * Initialize amzFulfillment plugin components */ function amzFulfillmentInit() { if(!is_plugin_active('woocommerce/woocommerce.php') && !is_plugin_active_for_network('woocommerce/woocommerce.php')) { add_action('admin_notices', 'amzFulfillmentWooCommerceError'); return; } AmzFulfillment_Main::instance()->init(); }