fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Issue displaying swatches (inactive variations showing)

Hello, i have described the bug in https://wordpress.org/support/topic/issue-displaying-swatches-inactive-variations-showing/

Just wanted to register this in your system and bring your attention to this as i’m sure i’m not the only one affected.

Hakik Zaman

Hi Rainer,

Thanks for reaching out to us and reporting the issue.

We have released an update. Please update the Variations Swatches and let me know whether it fixes the issue or not.

Hope to hear from you soon.

Thank You

Hi,

By looking at the code i’m sure if works for me at this moment, but would like to inform you that the change you did does not have the effect you hope. The function ‘variable_children_args’ only runs when ‘read_children’ hasn’t created transient value already. This transient value may be valid for 30 days.

Let’s say that i save the product.. the filter function runs and the transient gets generated with child product post id’s that are published. Now if i run WP All Import (WPAI) the values in saved transient are used and this function ‘variable_children_args’ is not called – so rendering this if statement you added useless.

The other way around.. lets say you also added a way to delete the transient before the WPAI runs it’s import.. the moment Woo calls ‘read_children’ the transient is generated.. and this breaks the displaying of swatches again as the products saved in transient are with statuses ‘publised’ and ‘private’. that for 30 days or until product is saved outside of WPAI import process.

I have not tested this myself as i’m not using this plugin, but having looked into the issue i had i felt the need to point that out to you. If i’m wrong and you have taken this into account and tested it not to be an issue – i apologize 😉

All the best

Hakik Zaman

Hi Rainer,

Thanks for the suggestions you have pointed out.

Now if I run WP All Import (WPAI) the values in saved transient are used and this function ‘variable_children_args’ is not called – so rendering this if statement you added useless.

We have already tested it using the WP All Import plugin. For now, we found it is working as expected and the if statement is working in our staging/testing site.

We will test further and add the robust solution if we find a hook from the WP All Import plugin.

Thanks again for sharing your thoughts.

We really get excited & honored when you use our plugin on your site.

If you found our plugin helpful, could you please leave your valuable review here: https://wordpress.org/support/plugin/woo-variation-swatches/reviews/?filter=5

Your rating keeps us inspired.

Thank You