when I hit the “save changes” that variations value changes to “any variation…” and I am not able to change it back.

My config:
I have updated wordpress to 4.7.4 and WooCommerce to 3.0.4. I also updated my Theme “Piancle” to 1.5.5 and I am using a child-theme.

I have created a “variable product” and created 3 variations for that. I have enabled stock management and they all were out of stock. Now I wanted to edit their stock. I did and when I hit the “save changes” that variations value changes to “any variation…” and I am not able to change it back.

I have test that “ANY CHANGE” makes this happen.

I also checked my error_log. Here is what I found:

[28-Apr-2017 14:12:02 UTC] PHP Notice: ID function was called incorrectly.Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/pinnacle/woocommerce/single-product.php’), wc_get_template_part, load_template, require(‘/themes/pinnacle/woocommerce/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, woocommerce_template_single_add_to_cart, do_action(‘woocommerce_variable_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, woocommerce_variable_add_to_cart, wc_get_template, include(‘/themes/pinnacle/woocommerce/single-product/add-to-cart/variable.php’), do_action(‘woocommerce_single_variation’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, kt_woocommerce_single_variation_add_to_cart_button, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong please for in /home/xxx/public_html/wp-includes/functions.php on line 4138

What is this notice saying and is it related to the problem? My priority is the problem about the variations. Can anyone guide me here?

Thanks in advance.

Read more here: Woocommerce: ID function was called <strong>incorrectly</strong>. Product properties should not be accessed directly


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: