Skip to content

Commit

Permalink
Merge pull request #47 from wuunder/development
Browse files Browse the repository at this point in the history
fix remember parcerlshopid checkout
  • Loading branch information
TimD90 authored Jun 5, 2020
2 parents 69d5562 + 932f2a7 commit 52db7ca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion includes/checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ 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(
'type' => 'text',
'class' => array(
'wuunder-hidden-checkout-field form-row-wide'
),
'autocomplete' => "new-password"
), $checkout->get_value('parcelshop_country'));
}

Expand Down Expand Up @@ -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' );
}
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ You can best contact us via [email protected]
7. Eenvoudig labels printen

== Changelog ==
= 2.7.18 =
* Fix remembering parcelshop id
= 2.7.17 =
* Fix customer booking email
= 2.7.16 =
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-wuunder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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() {

Expand Down

0 comments on commit 52db7ca

Please sign in to comment.