diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9cde609..8c1a069 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: matrix: include: - node-version: '14.x' - WORDPRESS_VERSION: 5.7.2 + WORDPRESS_VERSION: 5.8.3 PHP_VERSION: 7.4 WOOCOMMERCE_VERSION: 5.7.1 WORDPRESS_THEME: twentytwenty diff --git a/makefile b/makefile index 2bd7db2..2e21634 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ PLUGIN := 3-word-address-validation-field # Define the version (this is your single source of truth) -VERSION := 4.0.17 +VERSION := 4.0.18 # Define file paths PLUGIN_FILE := w3w-autosuggest/w3w-autosuggest.php diff --git a/w3w-autosuggest-blocks/package-lock.json b/w3w-autosuggest-blocks/package-lock.json index 1632569..48293eb 100644 --- a/w3w-autosuggest-blocks/package-lock.json +++ b/w3w-autosuggest-blocks/package-lock.json @@ -1,12 +1,12 @@ { "name": "w3w-autosuggest-blocks", - "version": "4.0.17-alpha.1", + "version": "4.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "w3w-autosuggest-blocks", - "version": "4.0.17-alpha.1", + "version": "4.0.18", "license": "GPL-2.0-only", "devDependencies": { "@woocommerce/block-library": "^2.3.0", diff --git a/w3w-autosuggest-blocks/package.json b/w3w-autosuggest-blocks/package.json index 4c6c58e..729fe56 100644 --- a/w3w-autosuggest-blocks/package.json +++ b/w3w-autosuggest-blocks/package.json @@ -1,6 +1,6 @@ { "name": "w3w-autosuggest-blocks", - "version": "4.0.17", + "version": "4.0.18", "description": "what3words plugin for blocks based woocommerce checkout", "author": "what3words", "license": "GPL-2.0-only", diff --git a/w3w-autosuggest-blocks/src/block.json b/w3w-autosuggest-blocks/src/block.json index f69c8f6..ebfcc59 100644 --- a/w3w-autosuggest-blocks/src/block.json +++ b/w3w-autosuggest-blocks/src/block.json @@ -1,7 +1,7 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, - "version": "4.0.17", + "version": "4.0.18", "title": "what3words Autosuggest", "category": "widgets", "attributes": { diff --git a/w3w-autosuggest/README.txt b/w3w-autosuggest/README.txt index faa6dd7..262eca0 100644 --- a/w3w-autosuggest/README.txt +++ b/w3w-autosuggest/README.txt @@ -3,7 +3,7 @@ Contributors: what3words Tags: what3words, 3 word address, three word address, searchbox, search, address, validation, autosuggest, w3w Requires at least: 4.7 Tested up to: 6.7.2 -Stable tag: 4.0.17 +Stable tag: 4.0.18 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -74,6 +74,14 @@ Have any questions? Want to learn more about how the what3words Address Field pl == Changelog == += 4.0.18 = +* Release 2025.08.19 +* Bug fixed for wordpress instances crashing when it doesn't have woocommerce + += 4.0.17 = +* Release 2025.07.03 +* Support for woocommerce blocks based check out + = 4.0.16 = * Release 2025.02.10 * Added input text sanitation in plugin settings diff --git a/w3w-autosuggest/includes/class-w3w-autosuggest.php b/w3w-autosuggest/includes/class-w3w-autosuggest.php index 2950338..3e102ac 100644 --- a/w3w-autosuggest/includes/class-w3w-autosuggest.php +++ b/w3w-autosuggest/includes/class-w3w-autosuggest.php @@ -173,10 +173,12 @@ private function set_locale() private function setup_blocks() { - if (!class_exists('W3W_Autosuggest_Blocks')) { - require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-w3w-autosuggest-blocks.php'; + if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { + if (!class_exists('W3W_Autosuggest_Blocks')) { + require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-w3w-autosuggest-blocks.php'; + } + new W3W_Autosuggest_Blocks($this->loader); } - new W3W_Autosuggest_Blocks($this->loader); } /** diff --git a/w3w-autosuggest/w3w-autosuggest.php b/w3w-autosuggest/w3w-autosuggest.php index d94a4a8..2e48f85 100644 --- a/w3w-autosuggest/w3w-autosuggest.php +++ b/w3w-autosuggest/w3w-autosuggest.php @@ -16,7 +16,7 @@ * Plugin Name: what3words Address Field * Plugin URI: https://github.com/what3words/wordpress-autosuggest-plugin * Description: Official plugin to allow customers to enter and validate a what3words address on your checkout for accurate deliveries - * Version: 4.0.17 + * Version: 4.0.18 * Author: what3words * Author URI: https://what3words.com * License: GPL-2.0+ @@ -55,7 +55,7 @@ * Current plugin version. */ if (!defined('W3W_PLUGIN_VERSION')) { - define('W3W_PLUGIN_VERSION', '4.0.17'); + define('W3W_PLUGIN_VERSION', '4.0.18'); } /** * Plugin settings name