| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: WCPOS – Point of Sale for WooCommerce |
| 4 | 4 | * Plugin URI: https://wordpress.org/plugins/woocommerce-pos/ |
| 5 | 5 | * Description: A simple front-end for taking WooCommerce orders at the Point of Sale. Requires <a href="http://wordpress.org/plugins/woocommerce/">WooCommerce</a>. |
| 6 | - * Version: 1.9.15 | |
| 6 | + * Version: 1.10.20 | |
| 7 | 7 | * Author: kilbot |
| 8 | 8 | * Author URI: http://wcpos.com |
| 9 | 9 | * Text Domain: woocommerce-pos |
| 10 | 10 | * License: GPL-3.0+ |
| @@ -10,13 +10,13 @@ | ||
| 10 | 10 | * License: GPL-3.0+ |
| 11 | 11 | * License URI: http://www.gnu.org/licenses/gpl-3.0.txt |
| 12 | 12 | * Domain Path: /languages |
| 13 | 13 | * Requires at least: 5.6 |
| 14 | - * Tested up to: 7.0 | |
| 14 | + * Tested up to: 7.1 | |
| 15 | 15 | * Requires PHP: 7.4 |
| 16 | 16 | * Requires Plugins: woocommerce |
| 17 | - * WC tested up to: 10.8.0 | |
| 18 | - * WC requires at least: 5.3. | |
| 17 | + * WC tested up to: 11.1.1 | |
| 18 | + * WC requires at least: 5.3 | |
| 19 | 19 | * |
| 20 | 20 | * @see http://wcpos.com |
| 21 | 21 | * @package WCPOS\WooCommercePOS |
| 22 | 22 | */ |
| @@ -24,12 +24,27 @@ | ||
| 24 | 24 | namespace WCPOS\WooCommercePOS; |
| 25 | 25 | |
| 26 | 26 | // Define plugin constants (use define() with checks to avoid conflicts when Pro plugin is active). |
| 27 | 27 | if ( ! \defined( __NAMESPACE__ . '\VERSION' ) ) { |
| 28 | - \define( __NAMESPACE__ . '\VERSION', '1.9.15' ); | |
| 28 | + \define( __NAMESPACE__ . '\VERSION', '1.10.20' ); | |
| 29 | 29 | } |
| 30 | + | |
| 31 | +/* | |
| 32 | + * Serve the lightweight ping before the rest of the stack loads. | |
| 33 | + * | |
| 34 | + * The class_exists() guard is load-bearing. Pro bundles this same class and may | |
| 35 | + * already have declared it from its own copy; require_once dedupes on resolved | |
| 36 | + * path, so requiring ours unconditionally re-declares it and fatals. That happens | |
| 37 | + * during the plugin include phase, which makes the Pro-is-active bail-out below | |
| 38 | + * too late to help and takes down every route on the site. | |
| 39 | + */ | |
| 40 | +if ( ! class_exists( API\V2\Ping::class, false ) ) { | |
| 41 | + require_once __DIR__ . '/includes/API/V2/Ping.php'; | |
| 42 | +} | |
| 43 | +API\V2\Ping::maybe_serve(); | |
| 44 | + | |
| 30 | 45 | if ( ! \defined( __NAMESPACE__ . '\TRANSLATION_VERSION' ) ) { |
| 31 | - \define( __NAMESPACE__ . '\TRANSLATION_VERSION', '2026.7.8' ); | |
| 46 | + \define( __NAMESPACE__ . '\TRANSLATION_VERSION', '2026.9.12' ); | |
| 32 | 47 | } |
| 33 | 48 | if ( ! \defined( __NAMESPACE__ . '\PLUGIN_NAME' ) ) { |
| 34 | 49 | \define( __NAMESPACE__ . '\PLUGIN_NAME', 'woocommerce-pos' ); |
| 35 | 50 | } |
| @@ -117,10 +132,18 @@ | ||
| 117 | 132 | } |
| 118 | 133 | } |
| 119 | 134 | |
| 120 | 135 | wcpos_load_autoloaders(); |
| 136 | +require_once __DIR__ . '/includes/API/class-aliases.php'; | |
| 121 | 137 | |
| 122 | 138 | if ( \defined( 'WP_CLI' ) && WP_CLI ) { |
| 139 | + if ( ! class_exists( \WCPOS\WooCommercePOS\Services\Anon_ID::class ) ) { | |
| 140 | + require_once __DIR__ . '/includes/Services/Anon_ID.php'; | |
| 141 | + } | |
| 142 | + if ( ! class_exists( \WCPOS\WooCommercePOS\CLI\Anon_ID_Command::class ) ) { | |
| 143 | + require_once __DIR__ . '/includes/CLI/Anon_ID_Command.php'; | |
| 144 | + } | |
| 145 | + | |
| 123 | 146 | \WP_CLI::add_command( 'wcpos anon-id', \WCPOS\WooCommercePOS\CLI\Anon_ID_Command::class ); |
| 124 | 147 | } |
| 125 | 148 | |
| 126 | 149 | // Environment variables. |
| @@ -190,5 +213,5 @@ | ||
| 190 | 213 | } |
| 191 | 214 | } |
| 192 | 215 | }, |
| 193 | 216 | 0 |
| 194 | -); | |
| 217 | +); | |