diff --git a/PluginInstallation/3.2.18/packlink-pro-shipping.zip b/PluginInstallation/3.2.18/packlink-pro-shipping.zip new file mode 100644 index 0000000..433cba9 Binary files /dev/null and b/PluginInstallation/3.2.18/packlink-pro-shipping.zip differ diff --git a/PluginInstallation/CHANGELOG.md b/PluginInstallation/CHANGELOG.md index 4ed165c..a7a3536 100644 --- a/PluginInstallation/CHANGELOG.md +++ b/PluginInstallation/CHANGELOG.md @@ -3,7 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [v3.2.17](https://github.com/logeecom/pl_woocommerce_module/compare/v3.2.1...v3.2.1) - 2023-06-06 +## [v3.2.18](https://github.com/logeecom/pl_woocommerce_module/compare/v3.2.17...v3.2.18) - 2023-07-19 +### Changed +- Fix issues with relay points +- Update phone number validation + +## [v3.2.17](https://github.com/logeecom/pl_woocommerce_module/compare/v3.2.16...v3.2.17) - 2023-06-06 ### Changed - Update link to order draft on Packlink diff --git a/src/Components/Checkout/class-checkout-handler.php b/src/Components/Checkout/class-checkout-handler.php index 5e01c4d..df7f8c5 100755 --- a/src/Components/Checkout/class-checkout-handler.php +++ b/src/Components/Checkout/class-checkout-handler.php @@ -259,6 +259,17 @@ public function get_drop_off_locations( $method_id ) { return $location_service->getLocations( $method_id, $customer['shipping_country'], $customer['shipping_postcode'] ); } + /** + * Displays message about drop-off locations search. + * + * @return void + */ + public function display_drop_off_message() { + if (empty($fields['shipping']['address_1']) || empty($fields['shipping']['address_2']) || empty($fields['shipping']['city']) || empty($fields['shipping']['postcode'])) { + wc_add_notice( __( 'You have to enter your address first in order to search for Drop-Off location.', 'packlink-pro-shipping' ), 'notice' ); + } + } + /** * Returns Packlink shipping method. * diff --git a/src/class-plugin.php b/src/class-plugin.php index c155b8f..696dad6 100755 --- a/src/class-plugin.php +++ b/src/class-plugin.php @@ -615,6 +615,7 @@ private function checkout_hooks_and_actions() { add_action( 'woocommerce_checkout_create_order', array( $handler, 'checkout_update_shipping_address' ), 10, 2 ); add_action( 'woocommerce_checkout_update_order_meta', array( $handler, 'checkout_update_drop_off' ), 10, 2 ); add_action( 'wp_enqueue_scripts', array( $handler, 'load_scripts' ) ); + add_action( 'woocommerce_before_checkout_form', array( $handler, 'display_drop_off_message' ) ); } /** diff --git a/src/composer.json b/src/composer.json index 7c95da7..0f2bc06 100644 --- a/src/composer.json +++ b/src/composer.json @@ -1,7 +1,7 @@ { "name": "packlink/woocommerce", "description": "Packlink WooCommerce Integration", - "version": "3.2.17", + "version": "3.2.18", "type": "library", "repositories": [ { @@ -12,7 +12,7 @@ ], "require": { "php": ">=5.6", - "packlink/integration-core": "3.3.15", + "packlink/integration-core": "3.3.16", "ext-json": "*", "ext-curl": "*", "ext-zip": "*", diff --git a/src/composer.lock b/src/composer.lock index 4ac66d8..c643f73 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "327b8b546849a1b44069f55e6e9910df", + "content-hash": "21ba67f6e13e4fd4d57f78a20c7e8bf8", "packages": [ { "name": "iio/libmergepdf", @@ -62,16 +62,16 @@ }, { "name": "packlink/integration-core", - "version": "v3.3.15", + "version": "v3.3.16", "source": { "type": "git", "url": "git@github.com:packlink-dev/ecommerce_module_core.git", - "reference": "e3fb931ad8d32c3c58d2a7abb3940e52abe5d0ec" + "reference": "3707f010e55c307de339989e1dea8c2641c4727f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/packlink-dev/ecommerce_module_core/zipball/e3fb931ad8d32c3c58d2a7abb3940e52abe5d0ec", - "reference": "e3fb931ad8d32c3c58d2a7abb3940e52abe5d0ec", + "url": "https://api.github.com/repos/packlink-dev/ecommerce_module_core/zipball/3707f010e55c307de339989e1dea8c2641c4727f", + "reference": "3707f010e55c307de339989e1dea8c2641c4727f", "shasum": "" }, "require": { @@ -110,7 +110,7 @@ "proprietary" ], "description": "Packlink integrations core library", - "time": "2023-06-06T08:23:56+00:00" + "time": "2023-07-19T07:49:39+00:00" }, { "name": "setasign/fpdf", @@ -1852,5 +1852,5 @@ "platform-overrides": { "php": "5.6.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/src/packlink-pro-shipping.php b/src/packlink-pro-shipping.php index 1f9f941..db8a204 100644 --- a/src/packlink-pro-shipping.php +++ b/src/packlink-pro-shipping.php @@ -9,7 +9,7 @@ * Plugin Name: Packlink PRO Shipping * Plugin URI: https://en.wordpress.org/plugins/packlink-pro-shipping/ * Description: Save up to 70% on your shipping costs. No fixed fees, no minimum shipping volume required. Manage all your shipments in a single platform. - * Version: 3.2.17 + * Version: 3.2.18 * Author: Packlink Shipping S.L. * Author URI: https://pro.packlink.es/ * License: GPL diff --git a/src/readme.txt b/src/readme.txt index e054dd2..e61e233 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce, shipment, shipping, packlink Requires at least: 4.7 Requires PHP: 5.5 Tested up to: 6.2 -Stable tag: 3.2.17 +Stable tag: 3.2.18 License: LICENSE-2.0 License URI: http://www.apache.org/licenses/LICENSE-2.0 @@ -68,6 +68,12 @@ Click