Version Description
- Fix - WP 4.7 compatibility
- Fix - add_to_cart Shortcode output buffering
- Fix - WooCommerce GZD Status Page
- Fix - Trusted Shops Rich Snippet Meta
- Fix - Country Codes for Virtual Rates
- Fix - On-hold to Processing Order Confirmation unhook
Download this release
Release Info
Developer | vendidero |
Plugin | WooCommerce Germanized |
Version | 1.7.4 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.4
- assets/js/add-to-cart-variation.js +2 -1
- assets/js/add-to-cart-variation.min.js +1 -1
- includes/admin/class-wc-gzd-admin-status.php +0 -4
- includes/admin/class-wc-gzd-admin.php +12 -27
- includes/admin/views/html-page-status.php +0 -48
- includes/class-wc-gzd-install.php +2 -2
- includes/class-wc-gzd-shortcodes.php +5 -2
- includes/trusted-shops/class-wc-gzd-trusted-shops-shortcodes.php +31 -1
- readme.txt +10 -2
- templates/trusted-shops/rich-snippets.php +3 -2
- woocommerce-germanized.php +10 -4
assets/js/add-to-cart-variation.js
CHANGED
@@ -59,6 +59,7 @@
|
|
59 |
$wrapper.find( '.price:not(.price-unit):first' ).html( variation.price_html ).addClass( 'variation_modified' );
|
60 |
$wrapper.find( '.price:not(.price-unit):first' ).find( '.price' ).contents().unwrap();
|
61 |
}
|
|
|
62 |
$wrapper.find( '.delivery-time-info:first' ).hide();
|
63 |
$wrapper.find( '.price-unit:first' ).hide();
|
64 |
$wrapper.find( '.tax-info:first' ).hide();
|
@@ -80,7 +81,7 @@
|
|
80 |
}
|
81 |
if ( variation.product_units !== '' ) {
|
82 |
$wrapper.find( '.product-units:first' ).remove();
|
83 |
-
$wrapper.find( '.product_meta' ).prepend('<span class="product-units-wrapper product-units variation_modified">' + variation.product_units + '</span>').show();
|
84 |
}
|
85 |
})
|
86 |
|
59 |
$wrapper.find( '.price:not(.price-unit):first' ).html( variation.price_html ).addClass( 'variation_modified' );
|
60 |
$wrapper.find( '.price:not(.price-unit):first' ).find( '.price' ).contents().unwrap();
|
61 |
}
|
62 |
+
|
63 |
$wrapper.find( '.delivery-time-info:first' ).hide();
|
64 |
$wrapper.find( '.price-unit:first' ).hide();
|
65 |
$wrapper.find( '.tax-info:first' ).hide();
|
81 |
}
|
82 |
if ( variation.product_units !== '' ) {
|
83 |
$wrapper.find( '.product-units:first' ).remove();
|
84 |
+
$wrapper.find( '.product_meta:first' ).prepend('<span class="product-units-wrapper product-units variation_modified">' + variation.product_units + '</span>').show();
|
85 |
}
|
86 |
})
|
87 |
|
assets/js/add-to-cart-variation.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/*!
|
2 |
* Variations Plugin
|
3 |
*/
|
4 |
-
!function(a){a.fn.wc_gzd_variation_form=function(){var b=this,c=b.parents(".type-product");a.fn.wc_gzd_variation_form.reset_variation=function(){a(".type-product").find(".org_price").length>0&&a(".type-product .price.variation_modified:not(.price-unit)").html(a(".type-product").find(".org_price").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_delivery_time").length>0&&a(".type-product .delivery-time-info").html(a(".type-product").find(".org_delivery_time").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_unit_price").length>0&&a(".type-product .price-unit").html(a(".product").find(".org_unit_price").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_tax_info").length>0&&a(".type-product .tax-info").html(a(".product").find(".org_tax_info").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_shipping_costs_info").length>0&&a(".type-product .shipping-costs-info").html(a(".product").find(".org_shipping_costs_info").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_product_units").length>0&&a(".type-product .product-units").html(a(".product").find(".org_product_units").html()).removeClass("variation_modified").show(),a(".org_product_info").remove(),a(".variation_modified").remove()},b.on("found_variation",function(b,d){c.find(".price:first").hasClass("variation_modified")||(c.append('<div class="org_price org_product_info">'+c.find(".price:not(.price-unit):first").html()+"</div>"),c.find(".delivery-time-info:first").length>0&&c.append('<div class="org_delivery_time org_product_info">'+c.find(".delivery-time-info:first").html()+"</div>"),c.find(".tax-info:first").length>0&&c.append('<div class="org_tax_info org_product_info">'+c.find(".tax-info:first").html()+"</div>"),c.find(".shipping-costs-info:first").length>0&&c.append('<div class="org_shipping_costs_info org_product_info">'+c.find(".shipping-costs-info:first").html()+"</div>"),c.find(".price-unit:first").length>0&&c.append('<div class="org_unit_price org_product_info">'+c.find(".price-unit:first").html()+"</div>"),c.find(".product-units:first").length>0&&c.append('<div class="org_product_units org_product_info">'+c.find(".product-units:first").html()+"</div>"),a(".org_product_info").hide()),""!==d.price_html&&(a(".single_variation .price").hide(),c.find(".price:not(.price-unit):first").html(d.price_html).addClass("variation_modified"),c.find(".price:not(.price-unit):first").find(".price").contents().unwrap()),c.find(".delivery-time-info:first").hide(),c.find(".price-unit:first").hide(),c.find(".tax-info:first").hide(),c.find(".shipping-costs-info:first").hide(),c.find(".product-units:first").hide(),""!==d.delivery_time&&c.find("p.delivery-time-info:first").html(d.delivery_time).addClass("variation_modified").show(),""!==d.tax_info&&c.find(".tax-info:first").html(d.tax_info).addClass("variation_modified").show(),""!==d.shipping_costs_info&&c.find(".shipping-costs-info:first").html(d.shipping_costs_info).addClass("variation_modified").show(),""!==d.unit_price&&(c.find(".price-unit:first").remove(),c.find('div[itemprop="offers"]:first').after('<p class="price price-unit smaller variation_modified">'+d.unit_price+"</p>").show()),""!==d.product_units&&(c.find(".product-units:first").remove(),c.find(".product_meta").prepend('<span class="product-units-wrapper product-units variation_modified">'+d.product_units+"</span>").show())}).on("update_variation_values",function(){setTimeout(function(){(!a(".single_variation_wrap").is(":visible")||a(".single_add_to_cart_button").is("[disabled]"))&&a.fn.wc_gzd_variation_form.reset_variation()},250)}).on("click",".reset_variations",function(){a.fn.wc_gzd_variation_form.reset_variation()}).on("reset_data",function(){a.fn.wc_gzd_variation_form.reset_variation()})},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_gzd_variation_form(),a(".variations_form .variations select").change(),void a(".variations_form .variations input:radio:checked").change())})}(jQuery,window,document);
|
1 |
/*!
|
2 |
* Variations Plugin
|
3 |
*/
|
4 |
+
!function(a){a.fn.wc_gzd_variation_form=function(){var b=this,c=b.parents(".type-product");a.fn.wc_gzd_variation_form.reset_variation=function(){a(".type-product").find(".org_price").length>0&&a(".type-product .price.variation_modified:not(.price-unit)").html(a(".type-product").find(".org_price").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_delivery_time").length>0&&a(".type-product .delivery-time-info").html(a(".type-product").find(".org_delivery_time").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_unit_price").length>0&&a(".type-product .price-unit").html(a(".product").find(".org_unit_price").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_tax_info").length>0&&a(".type-product .tax-info").html(a(".product").find(".org_tax_info").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_shipping_costs_info").length>0&&a(".type-product .shipping-costs-info").html(a(".product").find(".org_shipping_costs_info").html()).removeClass("variation_modified").show(),a(".type-product").find(".org_product_units").length>0&&a(".type-product .product-units").html(a(".product").find(".org_product_units").html()).removeClass("variation_modified").show(),a(".org_product_info").remove(),a(".variation_modified").remove()},b.on("found_variation",function(b,d){c.find(".price:first").hasClass("variation_modified")||(c.append('<div class="org_price org_product_info">'+c.find(".price:not(.price-unit):first").html()+"</div>"),c.find(".delivery-time-info:first").length>0&&c.append('<div class="org_delivery_time org_product_info">'+c.find(".delivery-time-info:first").html()+"</div>"),c.find(".tax-info:first").length>0&&c.append('<div class="org_tax_info org_product_info">'+c.find(".tax-info:first").html()+"</div>"),c.find(".shipping-costs-info:first").length>0&&c.append('<div class="org_shipping_costs_info org_product_info">'+c.find(".shipping-costs-info:first").html()+"</div>"),c.find(".price-unit:first").length>0&&c.append('<div class="org_unit_price org_product_info">'+c.find(".price-unit:first").html()+"</div>"),c.find(".product-units:first").length>0&&c.append('<div class="org_product_units org_product_info">'+c.find(".product-units:first").html()+"</div>"),a(".org_product_info").hide()),""!==d.price_html&&(a(".single_variation .price").hide(),c.find(".price:not(.price-unit):first").html(d.price_html).addClass("variation_modified"),c.find(".price:not(.price-unit):first").find(".price").contents().unwrap()),c.find(".delivery-time-info:first").hide(),c.find(".price-unit:first").hide(),c.find(".tax-info:first").hide(),c.find(".shipping-costs-info:first").hide(),c.find(".product-units:first").hide(),""!==d.delivery_time&&c.find("p.delivery-time-info:first").html(d.delivery_time).addClass("variation_modified").show(),""!==d.tax_info&&c.find(".tax-info:first").html(d.tax_info).addClass("variation_modified").show(),""!==d.shipping_costs_info&&c.find(".shipping-costs-info:first").html(d.shipping_costs_info).addClass("variation_modified").show(),""!==d.unit_price&&(c.find(".price-unit:first").remove(),c.find('div[itemprop="offers"]:first').after('<p class="price price-unit smaller variation_modified">'+d.unit_price+"</p>").show()),""!==d.product_units&&(c.find(".product-units:first").remove(),c.find(".product_meta:first").prepend('<span class="product-units-wrapper product-units variation_modified">'+d.product_units+"</span>").show())}).on("update_variation_values",function(){setTimeout(function(){(!a(".single_variation_wrap").is(":visible")||a(".single_add_to_cart_button").is("[disabled]"))&&a.fn.wc_gzd_variation_form.reset_variation()},250)}).on("click",".reset_variations",function(){a.fn.wc_gzd_variation_form.reset_variation()}).on("reset_data",function(){a.fn.wc_gzd_variation_form.reset_variation()})},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_gzd_variation_form(),a(".variations_form .variations select").change(),void a(".variations_form .variations input:radio:checked").change())})}(jQuery,window,document);
|
includes/admin/class-wc-gzd-admin-status.php
CHANGED
@@ -23,10 +23,6 @@ class WC_GZD_Admin_Status extends WC_Admin_Status {
|
|
23 |
);
|
24 |
|
25 |
public static function output() {
|
26 |
-
include_once( 'views/html-page-status.php' );
|
27 |
-
}
|
28 |
-
|
29 |
-
public static function germanized() {
|
30 |
include_once( 'views/html-page-status-germanized.php' );
|
31 |
}
|
32 |
|
23 |
);
|
24 |
|
25 |
public static function output() {
|
|
|
|
|
|
|
|
|
26 |
include_once( 'views/html-page-status-germanized.php' );
|
27 |
}
|
28 |
|
includes/admin/class-wc-gzd-admin.php
CHANGED
@@ -44,8 +44,9 @@ class WC_GZD_Admin {
|
|
44 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts' ) );
|
45 |
add_action( 'save_post', array( $this, 'save_legal_page_content' ), 10, 3 );
|
46 |
|
47 |
-
|
48 |
-
add_action( '
|
|
|
49 |
add_action( 'admin_init', array( $this, 'check_tour_hide' ) );
|
50 |
add_action( 'admin_init', array( $this, 'check_language_install' ) );
|
51 |
add_action( 'admin_init', array( $this, 'check_text_options_deletion' ) );
|
@@ -55,6 +56,15 @@ class WC_GZD_Admin {
|
|
55 |
add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'set_order_parcel_delivery_opted_in' ), 10, 1 );
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public function set_order_parcel_delivery_opted_in( $order ) {
|
59 |
|
60 |
if ( ! $order->parcel_delivery_opted_in )
|
@@ -82,31 +92,6 @@ class WC_GZD_Admin {
|
|
82 |
return $products;
|
83 |
}
|
84 |
|
85 |
-
/**
|
86 |
-
* Manually remove hook (class WC_Admin_Menus is noch callable)
|
87 |
-
*/
|
88 |
-
public function remove_status_page_hooks() {
|
89 |
-
global $wp_filter;
|
90 |
-
if ( isset( $wp_filter[ 'admin_menu' ][60] ) ) {
|
91 |
-
foreach ( $wp_filter[ 'admin_menu' ][60] as $k => $f ) {
|
92 |
-
if ( isset( $f[ 'function' ][1] ) && $f[ 'function' ][1] == 'status_menu' )
|
93 |
-
unset( $wp_filter[ 'admin_menu' ][60][$k] );
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
public function set_status_page() {
|
99 |
-
if ( ! is_ajax() ) {
|
100 |
-
include_once( 'class-wc-gzd-admin-status.php' );
|
101 |
-
add_action( 'admin_menu', array( $this, 'status_menu' ), 60 );
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
public function status_menu() {
|
106 |
-
add_submenu_page( 'woocommerce', __( 'WooCommerce Status', 'woocommerce-germanized' ), __( 'System Status', 'woocommerce-germanized' ) , 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
|
107 |
-
register_setting( 'woocommerce_status_settings_fields', 'woocommerce_status_options' );
|
108 |
-
}
|
109 |
-
|
110 |
public function status_page() {
|
111 |
WC_GZD_Admin_Status::output();
|
112 |
}
|
44 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts' ) );
|
45 |
add_action( 'save_post', array( $this, 'save_legal_page_content' ), 10, 3 );
|
46 |
|
47 |
+
add_filter( 'woocommerce_admin_status_tabs', array( $this, 'set_gzd_status_tab' ) );
|
48 |
+
add_action( 'woocommerce_admin_status_content_germanized', array( $this, 'status_tab' ) );
|
49 |
+
|
50 |
add_action( 'admin_init', array( $this, 'check_tour_hide' ) );
|
51 |
add_action( 'admin_init', array( $this, 'check_language_install' ) );
|
52 |
add_action( 'admin_init', array( $this, 'check_text_options_deletion' ) );
|
56 |
add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'set_order_parcel_delivery_opted_in' ), 10, 1 );
|
57 |
}
|
58 |
|
59 |
+
public function status_tab() {
|
60 |
+
WC_GZD_Admin_Status::output();
|
61 |
+
}
|
62 |
+
|
63 |
+
public function set_gzd_status_tab( $tabs ) {
|
64 |
+
$tabs[ 'germanized' ] = __( 'Germanized', 'woocommerce-germanized' );
|
65 |
+
return $tabs;
|
66 |
+
}
|
67 |
+
|
68 |
public function set_order_parcel_delivery_opted_in( $order ) {
|
69 |
|
70 |
if ( ! $order->parcel_delivery_opted_in )
|
92 |
return $products;
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
public function status_page() {
|
96 |
WC_GZD_Admin_Status::output();
|
97 |
}
|
includes/admin/views/html-page-status.php
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin View: Page - Status
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'status';
|
11 |
-
?>
|
12 |
-
<div class="wrap woocommerce">
|
13 |
-
<div class="icon32 icon32-woocommerce-status" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
14 |
-
<?php
|
15 |
-
$tabs = apply_filters( 'woocommerce_gzd_admin_status_tabs', array(
|
16 |
-
'status' => __( 'System Status', 'woocommerce-germanized' ),
|
17 |
-
'tools' => __( 'Tools', 'woocommerce-germanized' ),
|
18 |
-
'logs' => __( 'Logs', 'woocommerce-germanized' ),
|
19 |
-
'germanized' => __( 'Germanized', 'woocommerce-germanized' ),
|
20 |
-
) );
|
21 |
-
foreach ( $tabs as $name => $label ) {
|
22 |
-
echo '<a href="' . admin_url( 'admin.php?page=wc-status&tab=' . $name ) . '" class="nav-tab ';
|
23 |
-
if ( $current_tab == $name ) echo 'nav-tab-active';
|
24 |
-
echo '">' . $label . '</a>';
|
25 |
-
}
|
26 |
-
?>
|
27 |
-
</h2><br/>
|
28 |
-
<?php
|
29 |
-
switch ( $current_tab ) {
|
30 |
-
case "tools" :
|
31 |
-
WC_GZD_Admin_Status::status_tools();
|
32 |
-
break;
|
33 |
-
case "logs" :
|
34 |
-
WC_GZD_Admin_Status::status_logs();
|
35 |
-
break;
|
36 |
-
case "germanized" :
|
37 |
-
WC_GZD_Admin_Status::germanized();
|
38 |
-
break;
|
39 |
-
case "status":
|
40 |
-
case "":
|
41 |
-
WC_GZD_Admin_Status::status_report();
|
42 |
-
break;
|
43 |
-
default :
|
44 |
-
WC_GZD_Admin_Status::status_default( $current_tab );
|
45 |
-
break;
|
46 |
-
}
|
47 |
-
?>
|
48 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-wc-gzd-install.php
CHANGED
@@ -336,7 +336,7 @@ class WC_GZD_Install {
|
|
336 |
'DK' => 25,
|
337 |
'DE' => 19,
|
338 |
'EE' => 20,
|
339 |
-
'
|
340 |
'ES' => 21,
|
341 |
'FR' => 20,
|
342 |
'HR' => 25,
|
@@ -357,7 +357,7 @@ class WC_GZD_Install {
|
|
357 |
'SK' => 20,
|
358 |
'FI' => 24,
|
359 |
'SE' => 25,
|
360 |
-
'
|
361 |
);
|
362 |
|
363 |
if ( ! empty( $rates ) ) {
|
336 |
'DK' => 25,
|
337 |
'DE' => 19,
|
338 |
'EE' => 20,
|
339 |
+
'GR' => 23,
|
340 |
'ES' => 21,
|
341 |
'FR' => 20,
|
342 |
'HR' => 25,
|
357 |
'SK' => 20,
|
358 |
'FI' => 24,
|
359 |
'SE' => 25,
|
360 |
+
'GB' => 20,
|
361 |
);
|
362 |
|
363 |
if ( ! empty( $rates ) ) {
|
includes/class-wc-gzd-shortcodes.php
CHANGED
@@ -52,11 +52,14 @@ class WC_GZD_Shortcodes {
|
|
52 |
}
|
53 |
|
54 |
public static function gzd_add_to_cart( $atts ) {
|
|
|
55 |
add_filter( 'woocommerce_get_price_html', __CLASS__ . '::gzd_add_price_suffixes', 10, 2 );
|
56 |
-
|
57 |
-
|
58 |
|
59 |
remove_filter( 'woocommerce_get_price_html', __CLASS__ . '::gzd_add_price_features', 10 );
|
|
|
|
|
60 |
}
|
61 |
|
62 |
public static function replace_add_to_cart_shortcode( $shortcode ) {
|
52 |
}
|
53 |
|
54 |
public static function gzd_add_to_cart( $atts ) {
|
55 |
+
|
56 |
add_filter( 'woocommerce_get_price_html', __CLASS__ . '::gzd_add_price_suffixes', 10, 2 );
|
57 |
+
|
58 |
+
$html = WC_Shortcodes::product_add_to_cart( $atts );
|
59 |
|
60 |
remove_filter( 'woocommerce_get_price_html', __CLASS__ . '::gzd_add_price_features', 10 );
|
61 |
+
|
62 |
+
return $html;
|
63 |
}
|
64 |
|
65 |
public static function replace_add_to_cart_shortcode( $shortcode ) {
|
includes/trusted-shops/class-wc-gzd-trusted-shops-shortcodes.php
CHANGED
@@ -33,6 +33,32 @@ class WC_GZD_Trusted_Shops_Shortcodes {
|
|
33 |
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
* Returns Trusted Shops rich snippet review html
|
38 |
*
|
@@ -42,7 +68,11 @@ class WC_GZD_Trusted_Shops_Shortcodes {
|
|
42 |
public function trusted_shops_rich_snippets( $atts ) {
|
43 |
|
44 |
ob_start();
|
45 |
-
wc_get_template( 'trusted-shops/rich-snippets.php', array(
|
|
|
|
|
|
|
|
|
46 |
$html = ob_get_clean();
|
47 |
return $this->base->is_enabled() ? '<div class="woocommerce woocommerce-gzd">' . $html . '</div>' : '';
|
48 |
|
33 |
|
34 |
}
|
35 |
|
36 |
+
public function get_trusted_shops_rich_snippets_image() {
|
37 |
+
|
38 |
+
$image_url = '';
|
39 |
+
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
40 |
+
|
41 |
+
if ( ! empty( $custom_logo_id ) ) {
|
42 |
+
|
43 |
+
$image = wp_get_attachment_image_src( $custom_logo_id , 'full' );
|
44 |
+
|
45 |
+
if ( ! empty( $image ) )
|
46 |
+
$image_url = $image[0];
|
47 |
+
}
|
48 |
+
|
49 |
+
// Use WooCommerce E-Mail Header Image
|
50 |
+
if ( empty( $image_url ) ) {
|
51 |
+
$image_url = get_option( 'woocommerce_email_header_image' );
|
52 |
+
}
|
53 |
+
|
54 |
+
// Use Header Image
|
55 |
+
if ( empty( $image_url ) && function_exists( 'get_header_image' ) ) {
|
56 |
+
$image_url = get_header_image();
|
57 |
+
}
|
58 |
+
|
59 |
+
return apply_filters( 'woocommerce_gzd_trusted_shops_rich_snippets_image', $image_url );
|
60 |
+
}
|
61 |
+
|
62 |
/**
|
63 |
* Returns Trusted Shops rich snippet review html
|
64 |
*
|
68 |
public function trusted_shops_rich_snippets( $atts ) {
|
69 |
|
70 |
ob_start();
|
71 |
+
wc_get_template( 'trusted-shops/rich-snippets.php', array(
|
72 |
+
'rating' => $this->base->get_average_rating(),
|
73 |
+
'rating_link' => $this->base->get_rating_link(),
|
74 |
+
'image' => $this->get_trusted_shops_rich_snippets_image()
|
75 |
+
) );
|
76 |
$html = ob_get_clean();
|
77 |
return $this->base->is_enabled() ? '<div class="woocommerce woocommerce-gzd">' . $html . '</div>' : '';
|
78 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: vendidero
|
3 |
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.7.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -157,6 +157,14 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
= 1.7.3 =
|
161 |
* Fix - Variations Unit Price Saving
|
162 |
* Fix - Better Performance by using get_the_terms
|
2 |
Contributors: vendidero
|
3 |
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 4.7
|
6 |
+
Stable tag: 1.7.4
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 1.7.4 =
|
161 |
+
* Fix - WP 4.7 compatibility
|
162 |
+
* Fix - add_to_cart Shortcode output buffering
|
163 |
+
* Fix - WooCommerce GZD Status Page
|
164 |
+
* Fix - Trusted Shops Rich Snippet Meta
|
165 |
+
* Fix - Country Codes for Virtual Rates
|
166 |
+
* Fix - On-hold to Processing Order Confirmation unhook
|
167 |
+
|
168 |
= 1.7.3 =
|
169 |
* Fix - Variations Unit Price Saving
|
170 |
* Fix - Better Performance by using get_the_terms
|
templates/trusted-shops/rich-snippets.php
CHANGED
@@ -12,8 +12,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
12 |
?>
|
13 |
|
14 |
<div itemscope itemtype="http://schema.org/LocalBusiness" class="wc-gzd-trusted-shops-rating-widget">
|
15 |
-
<
|
16 |
-
|
|
|
17 |
<div class="star-rating">
|
18 |
<span style="width:<?php echo ( ( $rating[ 'avg' ] / $rating[ 'max' ] ) * 100 ); ?>%"></span>
|
19 |
</div>
|
12 |
?>
|
13 |
|
14 |
<div itemscope itemtype="http://schema.org/LocalBusiness" class="wc-gzd-trusted-shops-rating-widget">
|
15 |
+
<meta itemprop="name" content="<?php echo bloginfo( 'url' ); ?>">
|
16 |
+
<meta itemprop="image" content="<?php echo $image; ?>">
|
17 |
+
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
18 |
<div class="star-rating">
|
19 |
<span style="width:<?php echo ( ( $rating[ 'avg' ] / $rating[ 'max' ] ) * 100 ); ?>%"></span>
|
20 |
</div>
|
woocommerce-germanized.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Germanized
|
4 |
* Plugin URI: https://www.vendidero.de/woocommerce-germanized
|
5 |
* Description: Extends WooCommerce to become a legally compliant store for the german market.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: Vendidero
|
8 |
* Author URI: https://vendidero.de
|
9 |
* Requires at least: 3.8
|
@@ -28,7 +28,7 @@ final class WooCommerce_Germanized {
|
|
28 |
*
|
29 |
* @var string
|
30 |
*/
|
31 |
-
public $version = '1.7.
|
32 |
|
33 |
/**
|
34 |
* Single instance of WooCommerce Germanized Main Class
|
@@ -332,8 +332,13 @@ final class WooCommerce_Germanized {
|
|
332 |
if ( defined( 'DOING_AJAX' ) )
|
333 |
$this->ajax_includes();
|
334 |
|
335 |
-
if ( ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) )
|
336 |
-
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
// Post types
|
339 |
include_once ( 'includes/class-wc-gzd-post-types.php' );
|
@@ -700,6 +705,7 @@ final class WooCommerce_Germanized {
|
|
700 |
|
701 |
remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this->emails->get_email_instance_by_id( 'customer_processing_order' ), 'trigger' ) );
|
702 |
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this->emails->get_email_instance_by_id( 'customer_processing_order' ), 'trigger' ) );
|
|
|
703 |
|
704 |
remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this->emails->get_email_instance_by_id( 'new_order' ), 'trigger' ) );
|
705 |
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this->emails->get_email_instance_by_id( 'new_order' ), 'trigger' ) );
|
3 |
* Plugin Name: WooCommerce Germanized
|
4 |
* Plugin URI: https://www.vendidero.de/woocommerce-germanized
|
5 |
* Description: Extends WooCommerce to become a legally compliant store for the german market.
|
6 |
+
* Version: 1.7.4
|
7 |
* Author: Vendidero
|
8 |
* Author URI: https://vendidero.de
|
9 |
* Requires at least: 3.8
|
28 |
*
|
29 |
* @var string
|
30 |
*/
|
31 |
+
public $version = '1.7.4';
|
32 |
|
33 |
/**
|
34 |
* Single instance of WooCommerce Germanized Main Class
|
332 |
if ( defined( 'DOING_AJAX' ) )
|
333 |
$this->ajax_includes();
|
334 |
|
335 |
+
if ( ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) ) {
|
336 |
+
if ( did_action( 'woocommerce_loaded' ) ) {
|
337 |
+
$this->frontend_includes();
|
338 |
+
} else {
|
339 |
+
add_action( 'woocommerce_loaded', array( $this, 'frontend_includes' ), 5 );
|
340 |
+
}
|
341 |
+
}
|
342 |
|
343 |
// Post types
|
344 |
include_once ( 'includes/class-wc-gzd-post-types.php' );
|
705 |
|
706 |
remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this->emails->get_email_instance_by_id( 'customer_processing_order' ), 'trigger' ) );
|
707 |
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this->emails->get_email_instance_by_id( 'customer_processing_order' ), 'trigger' ) );
|
708 |
+
remove_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this->emails->get_email_instance_by_id( 'customer_processing_order' ), 'trigger' ) );
|
709 |
|
710 |
remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this->emails->get_email_instance_by_id( 'new_order' ), 'trigger' ) );
|
711 |
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this->emails->get_email_instance_by_id( 'new_order' ), 'trigger' ) );
|