diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d56cd..9ceaa05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## Released -## [2.7.17](https://github.com/kabisa/wuunder-webshopplugin-woocommerce/tag/2.7.17) - 2020-05-01 +## [2.7.18](https://github.com/wuunder/wuunder-webshopplugin-woocommerce/tag/2.7.18) - 2020-06-02 + +### Fixed +- Fixed remembering parcelshop id + +## [2.7.17](https://github.com/wuunder/wuunder-webshopplugin-woocommerce/tag/2.7.17) - 2020-05-01 ### Fixed - Fixed customer booking email diff --git a/includes/checkout.php b/includes/checkout.php index 902a937..6242cc3 100644 --- a/includes/checkout.php +++ b/includes/checkout.php @@ -87,6 +87,7 @@ function wcwp_add_parcelshop_id_field($checkout) 'class' => array( 'wuunder-hidden-checkout-field form-row-wide' ), + 'autocomplete' => "new-password" ), $checkout->get_value('parcelshop_id')); woocommerce_form_field('parcelshop_country', array( @@ -94,6 +95,7 @@ function wcwp_add_parcelshop_id_field($checkout) 'class' => array( 'wuunder-hidden-checkout-field form-row-wide' ), + 'autocomplete' => "new-password" ), $checkout->get_value('parcelshop_country')); } @@ -182,7 +184,7 @@ function wcwp_get_order_weight($order_id) add_action('woocommerce_checkout_update_order_meta', 'wcwp_update_parcelshop_id'); function wcwp_update_parcelshop_id($order_id) { - if (!empty($_POST['parcelshop_id'])) { + if (!empty($_POST['parcelshop_id']) && isset($_POST['shipping_method']) && isset($_POST['shipping_method'][0]) && 'wuunder_parcelshop' === sanitize_text_field($_POST['shipping_method'][0])) { update_post_meta($order_id, 'parcelshop_id', sanitize_text_field($_POST['parcelshop_id'])); WC()->session->__unset( 'WCWP_SELECTED_PARCELSHOP_ID' ); } diff --git a/readme.txt b/readme.txt index 43dee3c..05d5671 100644 --- a/readme.txt +++ b/readme.txt @@ -97,6 +97,8 @@ You can best contact us via info@wearewuunder.com 7. Eenvoudig labels printen == Changelog == += 2.7.18 = +* Fix remembering parcelshop id = 2.7.17 = * Fix customer booking email = 2.7.16 = diff --git a/woocommerce-wuunder.php b/woocommerce-wuunder.php index 436f5c5..288c09b 100644 --- a/woocommerce-wuunder.php +++ b/woocommerce-wuunder.php @@ -3,7 +3,7 @@ * Plugin Name: Wuunder for-woocommerce * Plugin URI: https://wearewuunder.com/wuunder-voor-webshops/ * Description: Wuunder shipping plugin - * Version: 2.7.17 + * Version: 2.7.18 * Author: Wuunder * Author URI: http://wearewuunder.com */ @@ -57,7 +57,7 @@ class Woocommerce_Wuunder { public static $plugin_path; public static $plugin_basename; - const VERSION = '2.7.16'; + const VERSION = '2.7.18'; public function __construct() {