Skip to content

Commit

Permalink
Fix: compatibility issue with WooCommerce < 6.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Jan 23, 2024
1 parent 6a19398 commit c187d5a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion includes/API/Traits/Uuid_Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use function get_user_meta;
use function update_user_meta;

/**
*
*/
trait Uuid_Handler {
/**
* Make sure the WC Data Object has a uuid.
Expand Down Expand Up @@ -168,7 +171,7 @@ private function create_uuid(): string {
private function uuid_postmeta_exists( string $uuid, WC_Data $object ): bool {
global $wpdb;

if ( $object instanceof WC_Abstract_Order && OrderUtil::custom_orders_table_usage_is_enabled() ) {
if ( $object instanceof WC_Abstract_Order && class_exists( OrderUtil::class ) && OrderUtil::custom_orders_table_usage_is_enabled() ) {
// Check the orders meta table.
$result = $wpdb->get_var(
$wpdb->prepare(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wcpos/woocommerce-pos",
"version": "1.4.9",
"version": "1.4.10",
"description": "A simple front-end for taking WooCommerce orders at the Point of Sale.",
"main": "index.js",
"workspaces": {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: kilbot
Tags: cart, e-commerce, ecommerce, inventory, point-of-sale, pos, sales, sell, shop, shopify, store, vend, woocommerce, wordpress-ecommerce
Requires at least: 5.6 & WooCommerce 5.3
Tested up to: 6.4
Stable tag: 1.4.9
Stable tag: 1.4.10
License: GPL-3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -63,6 +63,9 @@ There is more information on our website at [https://wcpos.com](https://wcpos.co

== Changelog ==

= 1.4.10 =
* Fix: compatibility issue with WooCommerce < 6.7.0

= 1.4.9 - 2024/01/21 =
= 1.4.8 - 2024/01/21 =
* Fix: duplicating Products in WC Admin also duplicated POS UUID, which caused problems
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-pos.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce POS
* Plugin URI: https://wordpress.org/plugins/woocommerce-pos/
* Description: A simple front-end for taking WooCommerce orders at the Point of Sale. Requires <a href="http://wordpress.org/plugins/woocommerce/">WooCommerce</a>.
* Version: 1.4.9
* Version: 1.4.10
* Author: kilbot
* Author URI: http://wcpos.com
* Text Domain: woocommerce-pos
Expand All @@ -22,7 +22,7 @@
namespace WCPOS\WooCommercePOS;

// Define plugin constants.
const VERSION = '1.4.9';
const VERSION = '1.4.10';
const PLUGIN_NAME = 'woocommerce-pos';
const SHORT_NAME = 'wcpos';
\define( __NAMESPACE__ . '\PLUGIN_FILE', plugin_basename( __FILE__ ) ); // 'woocommerce-pos/woocommerce-pos.php'
Expand Down

0 comments on commit c187d5a

Please sign in to comment.