From b1cf55e93e3ce66f0e1f2cce1822c9ecbb03ba34 Mon Sep 17 00:00:00 2001 From: Eclipse Srl Date: Thu, 5 Sep 2019 17:43:32 +0200 Subject: [PATCH] fixed product tag --- README.txt | 6 +++++- includes/misc/terms.php | 17 ++++++++++++++++- .../woocommerce/checkout/new-review-order.php | 17 ++++++++--------- udesly-adapter-plugin.php | 4 ++-- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/README.txt b/README.txt index 0bc48b6..4c3b697 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ Donate link: https://www.udesly.com/ Tags: webflow to wordpress, editor, page builder, layout design, udesly, webflow Requires at least: 5.0 Tested up to: 5.2.2 -Stable tag: 2.0.0.21 +Stable tag: 2.0.0.22 License: GPLv3 or later License URI: https://www.udesly.com/terms-conditions-of-use/#udesly-wordpress-plugin Requires PHP: 5.6.0 @@ -81,6 +81,10 @@ That's all! Absolutely! You can use the Udesly Adapter to create more than one website. == Changelog == += 2.0.0.22 = +* Fixed featured image on product_tag pages +* Added strongs on woocommerce template review-order + = 2.0.0.21 = * Fixed frontend editor scripts diff --git a/includes/misc/terms.php b/includes/misc/terms.php index aa43caa..5293570 100644 --- a/includes/misc/terms.php +++ b/includes/misc/terms.php @@ -104,7 +104,22 @@ function udesly_get_term_featured_image($term_id = null, $dimension = 'full', $o } if ($img_url == "" && ("product" == $type || $term->taxonomy === "product_tag" || $term->taxonomy === "product_cat")) { - $img_url = esc_url( wc_placeholder_img_src() ); + if ($key == "_featured_image") { + $key = "thumbnail_id"; + } else { + $key = "_featured_image"; + } + $img = get_term_meta($term_id, $key, true); + if ($img) { + $dimension = apply_filters('udesly_get_term_featured_image_dimension', $dimension); + $img_url = wp_get_attachment_image_src($img, $dimension)[0]; + } + else { + $img_url = ""; + } + if ($img_url == "") { + $img_url = esc_url( wc_placeholder_img_src() ); + } } return apply_filters('udesly_get_term_featured_image', $img_url, $term_id); diff --git a/templates/woocommerce/checkout/new-review-order.php b/templates/woocommerce/checkout/new-review-order.php index 47a86df..82286d8 100644 --- a/templates/woocommerce/checkout/new-review-order.php +++ b/templates/woocommerce/checkout/new-review-order.php @@ -21,13 +21,12 @@ global $udesly_checkout_classes; - ?>
-
-
+
+
-
+
cart->get_coupons() as $code => $coupon ) : ?>
-
+
@@ -76,7 +75,7 @@ cart->get_fees() as $fee ) : ?>
-
name ); ?>
+
name ); ?>
@@ -85,13 +84,13 @@ cart->get_tax_totals() as $code => $tax ) : ?>
-
label ); ?>
+
label ); ?>
formatted_amount ); ?>
-
countries->tax_or_vat() ); ?>
+
countries->tax_or_vat() ); ?>
@@ -100,7 +99,7 @@
-
+
diff --git a/udesly-adapter-plugin.php b/udesly-adapter-plugin.php index ad4dde7..ce9f4f8 100644 --- a/udesly-adapter-plugin.php +++ b/udesly-adapter-plugin.php @@ -11,7 +11,7 @@ * Plugin Name: Udesly Adapter * Plugin URI: https://www.udesly.com * Description: This is a support plugin for Udesly (Webflow to WordPress converter) that allows you to enable additional features for your theme. - * Version: 2.0.0.21 + * Version: 2.0.0.22 * Author: Udesly * Author URI: https://www.udesly.com * License: GPL-2.0+ @@ -29,7 +29,7 @@ // Constants defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH', plugin_dir_path(__FILE__)); defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL', plugin_dir_url(__FILE__)); -defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.0.21"); +defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.0.22"); defined('UDESLY_TEXT_DOMAIN') ?: define('UDESLY_TEXT_DOMAIN', "udesly-adapter-plugin"); defined('UDESLY_ADAPTER_PLUGIN_MISC_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_MISC_PATH', plugin_dir_path(__FILE__) . 'includes/misc/');