maximeschoeni / sublanguage

Multilanguage plugin for wordpress
42 stars 13 forks source link

Woocommerce > Translate Products > class-wc-query.php and price-filter.php error #63

Open berto-dev opened 2 years ago

berto-dev commented 2 years ago

First of all: Congrats for this great alternative. It's a hard and very worthwhile project. Fantastic.

That said, one problem:

If you try to check the translation of Products something (maybe an object?) in woocommerce changes and the sidebar print errors.

Using dynamic_sidebar('sidebar shop'); in the theme it will appear, for each filter:

price filter:

Trying to get property 'post_count' of non-object in /"MYHOSTHEMEPATH"/wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php on line 80

color and other attributes:

Trying to get property 'query_vars' of non-object in /"MYHOSTHEMEPATH"/wp-content/plugins/woocommerce/includes/class-wc-query.php on line 846

Trying to get property 'query_vars' of non-object in /"MYHOSTHEMEPATH"/wp-content/plugins/woocommerce/includes/class-wc-query.php on line 858

That's it.

In any case, great work!

PS. I had to update this because I assumed it depends on the attributes, instead it is directly connected to the translation of the products