You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -107,16 +115,16 @@ private function get_total_retail_value_by_term($term_id) {
107
115
$products = newWP_Query($args);
108
116
$total_value = 0;
109
117
if ($products->have_posts()) {
110
-
while ($products->have_posts()) {
111
-
$products->the_post();
112
-
$product = wc_get_product(get_the_ID());
113
-
$total_value += $product->get_price();
114
-
}
115
-
wp_reset_postdata();
118
+
while ($products->have_posts()) {
119
+
$products->the_post();
120
+
$product = wc_get_product(get_the_ID());
121
+
$total_value += $product->get_price();
116
122
}
117
-
118
-
return$total_value;
123
+
wp_reset_postdata();
119
124
}
125
+
126
+
return$total_value;
127
+
}
120
128
}
121
129
122
130
// In this class, we first define the `__construct()` method, which calls the parent constructor and adds the `product_brand_list` shortcode with the `product_brand_list_shortcode()` method as its callback.
Description: A WooCommerce plugin that adds a custom taxonomy 'product_brand' to products and allows the attachment of images to the product_brand. Each image links to a search result for that taxonomy.
Copy file name to clipboardexpand all lines: readme.md
+1
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ To use this shortcode, you can simply add `[product_brand_list]` to any post or
17
17
* 1.0.7 - shortcode url link correction, link to slug instead of brand name.
18
18
* 1.0.8 - Bug Fix - class WooCommerce_Product_Brand does not have a method "save_product_brand_meta_data"
19
19
* 1.0.9 - Updated CSS rules to isolate styling to product brands only.
20
+
* 1.0.10 - Added shortcode attributes for limit and scroll. Scroll=0 disables flickity functionality & scripts. Limit=12 sets the number of brands to display (default 12).
0 commit comments