w2s-migrate-woo-to-shopify
Last commit date
admin
5 months ago
assets
5 months ago
includes
5 months ago
languages
5 months ago
public
5 months ago
README.txt
5 months ago
autoload.php
5 months ago
changelog.txt
5 months ago
uninstall.php
5 months ago
w2s-migrate-woo-to-shopify.php
5 months ago
w2s-migrate-woo-to-shopify.php
102 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: W2S - Migrate WooCommerce to Shopify |
| 4 | * Plugin URI: https://villatheme.com/extensions/w2s-migrate-woocommerce-to-shopify/ |
| 5 | * Description: Migrate all products and categories from WooCommerce to Shopify |
| 6 | * Version: 1.3.2 |
| 7 | * Author: Villatheme |
| 8 | * Author URI: https://villatheme.com/ |
| 9 | * License: GPL v2 or later |
| 10 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 | * Text Domain: w2s-migrate-woo-to-shopify |
| 12 | * Copyright 2021 - 2025 VillaTheme.com. All rights reserved. |
| 13 | * Domain Path: /languages |
| 14 | * Requires at least: 5.0 |
| 15 | * Tested up to: 6.8 |
| 16 | * WC requires at least: 7.0.0 |
| 17 | * WC tested up to: 10.0 |
| 18 | * Requires PHP: 7.0 |
| 19 | * Requires Plugins: woocommerce |
| 20 | */ |
| 21 | |
| 22 | if ( ! defined( 'ABSPATH' ) ) { |
| 23 | exit; |
| 24 | } |
| 25 | //compatible with 'High-Performance order storage (COT)' |
| 26 | add_action( 'before_woocommerce_init', function () { |
| 27 | if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { |
| 28 | \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 29 | } |
| 30 | } ); |
| 31 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 32 | if ( is_plugin_active( 'w2s-migrate-woocommerce-to-shopify/w2s-migrate-woocommerce-to-shopify.php' ) ) { |
| 33 | return; |
| 34 | } |
| 35 | /** |
| 36 | * Currently plugin version. |
| 37 | * Start at version 1.0.0 and use SemVer - https://semver.org |
| 38 | * Rename this for your plugin and update it as you release new versions. |
| 39 | */ |
| 40 | define( 'VIW2S_VERSION', '1.3.2' ); |
| 41 | define( 'VIW2S_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 42 | define( 'VIW2S_DIR_URL', plugin_dir_url( __FILE__ ) ); |
| 43 | define( 'VIW2S_CSS', VIW2S_DIR_URL . 'assets/css/' ); |
| 44 | define( 'VIW2S_ADMIN_CSS', VIW2S_DIR_URL . 'admin/css/' ); |
| 45 | define( 'VIW2S_ADMIN_JS', VIW2S_DIR_URL . 'admin/js/' ); |
| 46 | define( 'VIW2S_BASE_NAME', plugin_basename( __FILE__ ) ); |
| 47 | |
| 48 | require_once VIW2S_DIR_PATH . 'includes/support.php'; |
| 49 | |
| 50 | if ( ! defined( 'VIW2S_IMPORT_WOOCOMMERCE_TO_SHOPIFY_CACHE' ) ) { |
| 51 | define( 'VIW2S_IMPORT_WOOCOMMERCE_TO_SHOPIFY_CACHE', WP_CONTENT_DIR . "/cache/import-woocommerce-to-shopify/" );//use the same cache folder with free version |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * The code that runs during plugin activation. |
| 56 | * This action is documented in includes/class-viw2s-activator.php |
| 57 | */ |
| 58 | function activate_viw2s() { |
| 59 | require_once plugin_dir_path( __FILE__ ) . 'includes/class-vi-w2s-activator.php'; |
| 60 | VI_IMPORT_WOOCOMMERCE_TO_SHOPIFY_Activator::activate(); |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * The code that runs during plugin deactivation. |
| 65 | * This action is documented in includes/class-viw2s-deactivator.php |
| 66 | */ |
| 67 | //function deactivate_viw2s() { |
| 68 | // require_once plugin_dir_path( __FILE__ ) . 'includes/class-vi-w2s-deactivator.php'; |
| 69 | // VI_IMPORT_WOOCOMMERCE_TO_SHOPIFY_Deactivator::deactivate(); |
| 70 | //} |
| 71 | |
| 72 | register_activation_hook( __FILE__, 'activate_viw2s' ); |
| 73 | //register_deactivation_hook( __FILE__, 'deactivate_viw2s' ); |
| 74 | |
| 75 | |
| 76 | /** |
| 77 | * The core plugin class that is used to define internationalization, |
| 78 | * admin-specific hooks, and public-facing site hooks. |
| 79 | */ |
| 80 | require plugin_dir_path( __FILE__ ) . 'includes/class-vi-w2s.php'; |
| 81 | |
| 82 | /** |
| 83 | * Begins execution of the plugin. |
| 84 | * |
| 85 | * Since everything within the plugin is registered via hooks, |
| 86 | * then kicking off the plugin from this point in the file does |
| 87 | * not affect the page life cycle. |
| 88 | * |
| 89 | * @since 1.0.0 |
| 90 | */ |
| 91 | function run_viw2s_import() { |
| 92 | if ( is_plugin_active( 'w2s-migrate-woocommerce-to-shopify\w2s-migrate-woocommerce-to-shopify.php' ) ) { |
| 93 | return; |
| 94 | } |
| 95 | include plugin_dir_path( __FILE__ ) . '/autoload.php'; |
| 96 | $plugin = new Vi_W2s(); |
| 97 | $plugin->run(); |
| 98 | |
| 99 | } |
| 100 | |
| 101 | run_viw2s_import(); |
| 102 |