Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix remember parcerlshopid checkout #47

Merged
merged 7 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 =
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