Skip to content

Commit

Permalink
1.8.9 Settings Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Apr 14, 2017
1 parent 42c2b38 commit 8013aea
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 5 deletions.
5 changes: 4 additions & 1 deletion assets/css/woocommerce-gzd-activation.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ p.wc-gzd-actions a.button-primary:hover, .woocommerce-gzd-message .button-primar
.woocommerce-gzd-message a.wc-gzd-skip {
opacity: .7;
}
.woocommerce-gzd-message {
div.woocommerce-gzd-message {
border-left: 4px solid #bb2525 !important;
}
div.woocommerce-gzd-message p {
max-width: 100% !important;
}
2 changes: 1 addition & 1 deletion assets/css/woocommerce-gzd-activation.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/js/add-to-cart-variation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
if ( $wrapper.find('.org_product_units').length > 0 ) {
$wrapper.find('.product-units:first' ).html( $wrapper.find('.org_product_units').html() ).removeClass('variation_modified').show();
}

$('.org_product_info').remove();
$('.variation_modified').remove();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ public function get_display_settings() {
'desc' => __( 'Select shipping methods which are applicable for the Opt-In Checkbox.', 'woocommerce-germanized' ),
'desc_tip' => true,
'id' => 'woocommerce_gzd_checkout_legal_parcel_delivery_checkbox_methods',
'default' => array( 'downloadable' ),
'default' => array(),
'class' => 'chosen_select',
'options' => $shipping_methods_options,
'type' => 'multiselect',
Expand Down
3 changes: 2 additions & 1 deletion includes/class-wc-gzd-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class WC_GZD_Install {
'1.5.0' => 'updates/woocommerce-gzd-update-1.5.0.php',
'1.6.0' => 'updates/woocommerce-gzd-update-1.6.0.php',
'1.6.3' => 'updates/woocommerce-gzd-update-1.6.3.php',
'1.8.0' => 'updates/woocommerce-gzd-update-1.8.0.php'
'1.8.0' => 'updates/woocommerce-gzd-update-1.8.0.php',
'1.8.9' => 'updates/woocommerce-gzd-update-1.8.9.php'
);

/**
Expand Down
36 changes: 36 additions & 0 deletions includes/updates/woocommerce-gzd-update-1.8.9.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

// Get all variable products
if ( ! defined( 'ABSPATH' ) ) {
exit;
}

$parcel_settings = get_option( 'woocommerce_gzd_checkout_legal_parcel_delivery_checkbox_methods', array() );

if ( class_exists( 'WC_Shipping_Zones' ) ) {

$shipping_methods_options = WC_GZD_Admin::instance()->get_shipping_method_instances_options();
$new_options = array();

if ( ! empty( $parcel_settings ) ) {
foreach ( (array) $parcel_settings as $method ) {

if ( 'downloadable' === $method ) {
continue;
}

foreach ( $shipping_methods_options as $key => $option ) {
$key_method = explode( ':', $key );

if ( isset( $key_method[0] ) && $key_method[0] == $method ) {
array_push( $new_options, $key );
}
}
}
}

update_option( 'woocommerce_gzd_checkout_legal_parcel_delivery_checkbox_methods', $new_options );

}

?>
12 changes: 11 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: vendidero
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
Requires at least: 3.8
Tested up to: 4.7
Stable tag: 1.8.8
Stable tag: 1.8.9
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -167,6 +167,16 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider

== Changelog ==

= 1.8.9 =
* Feature - Allow DHL parcel shop delivery for certain shipping rates only
* Improvement - woocommerce_gzd_add_to_cart_variation_params filter to adjust wrapper name
* Improvement - better shipping rate choosing options (choose instances instead of methods) for parcel delivery checkbox
* Fix - Double Opt In WooCommerce 3.0
* Fix - Use get_rate_code for order item totals
* Fix - WooCommerce 3.0 stock reducing
* Fix - Order Item Meta CRUD - better product instance check
* Fix - Disable Paid for Order Email for direct debit and invoice gateway

= 1.8.8 =
* Feature - Better product data saving
* Feature - Allow setting a custom Small Business notice text
Expand Down

0 comments on commit 8013aea

Please sign in to comment.