Skip to content

Commit 0e31be2

Browse files
committed
1.0.8 - Bug Fix - class WooCommerce_Product_Brand does not have a method
1 parent efda0d0 commit 0e31be2

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

includes/class-product-brand.php

+1-13
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ class WooCommerce_Product_Brand
77
public function __construct()
88
{
99
add_action('init', array($this, 'register_product_brand_taxonomy'));
10-
add_action('save_post_product', array($this, 'save_product_brand_meta_data'));
11-
add_action('save_post_product', array($this, 'save_product_brand_weight_data'));
1210
add_filter('term_link', array($this, 'term_link'), 10, 2);
1311
}
1412

@@ -96,17 +94,7 @@ public function product_brand_sort_request($vars)
9694
return $vars;
9795
}
9896

99-
public function save_product_brand_weight_data($term_id, $tt_id, $taxonomy)
100-
{
101-
if (!isset($_POST['product_brand_weight'])) {
102-
return;
103-
}
104-
105-
$weight = sanitize_text_field($_POST['product_brand_weight']);
106-
update_term_meta($term_id, 'product_brand_weight', $weight);
107-
}
108-
109-
public function term_link($url, $term)
97+
public function term_link($url, $term)
11098
{
11199
if ($term->taxonomy === 'product_brand') {
112100
$url = add_query_arg(array('product_brand' => $term->slug), home_url('/'));

product-brands.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: WooCommerce Product Brand
44
Plugin URI: https://frydigital.com/plugins/fd-product-brands/
55
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.
6-
Version: 1.0.7
6+
Version: 1.0.8
77
Author: Fry Digital
88
Author URI: https://frydigital.com/
99
License: GPLv3

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ To use this shortcode, you can simply add `[product_brand_list]` to any post or
1515
* 1.0.5 - Remove private key for updates (push to public repo)
1616
* 1.0.6 - Responsive CSS update, enable draggable
1717
* 1.0.7 - shortcode url link correction, link to slug instead of brand name.
18+
* 1.0.8 - Bug Fix - class WooCommerce_Product_Brand does not have a method "save_product_brand_meta_data"
1819

1920

2021
# Future Development

0 commit comments

Comments
 (0)