fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

woocommerce_available_variation

shlomi bisa

Hello my how are you ?

I  have in the category page

$product->get_available_variations();

The gets Data from  woocommerce_available_variation hook.

How can I remove the woocommerce_available_variation from the category page.

I try remove_filter and did not work .

Thanks Dani

 

 

 

 

Hakik Zaman

Hello shlomi bisa,

Thanks for reaching out to us. I am sorry I didn’t understand your query.

Do you want to remove swatches on the shop category page?

Hope to hear from you soon.

Thanks

shlomi bisa

I am takeing about  Additional Variation Images Gallery for WooCommerce

No in my thame I have this $product->get_available_variations(); 

So I is calling Additional Variation Images Gallery in the catahory page.

I need to find away to disable in In the category page.

 

Hakik Zaman

Hello shlomi bisa,

Sorry for the inconvenience. Our Additional Variation Images Gallery works on only a single product page.

So, the $product->get_available_variations();is coming from your theme.

Could you please contact your theme developer on this issue?

They will know better about their theme structure.

Thanks

shlomi bisa

As I told you $product->get_available_variations(); is coming from my theme.

I need your help to on hook it.

My dev them did try with no success.

Can you pelase help and and show how to unhook it ?

 

Hakik Zaman

Hello shlomi bisa,

I see, I am not assuring you that I can find a fix (Because theme to theme structure defers).

But I will try my level best to find a fix for you.

Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out issues.

Please also send us the latest version of the theme that you are using on your site. We’ll try to investigate your issue by installing your theme on our local setup.

You can upload the theme file in Dropbox or Google Drive and send the download link here directly.

Looking forward to hearing from you soon.

Thank you

shlomi bisa

Hi thanks for getting back to me.

How ever white the Theme used ACF to get the theme to work.

It’s hard to install it with out the database.

Thanks for the offer.

What we  need is to un hook

in the includes/hooks.php the is
add_filter( ‘woocommerce_available_variation’, ‘wvg_available_variation_gallery’, 90, 3 );

I what in my theme to remove from this .
The conditions to remove it I can do.
Just when I add to my theme  “remove_filter( ‘woocommerce_available_variation’, ‘wvg_available_variation_gallery’, 90, 3 );”

it still works !!
Thanks

Hakik Zaman

Hello shlomi,

You can try the below code inside your child theme’s functions.php or, snippet as Code Snippet plugin

function wvg_remove_gallery(){
   remove_filter( ‘woocommerce_available_variation’, ‘wvg_available_variation_gallery’, 90, 3 );
}
add_action( 'init', 'wvg_remove_gallery' );

Please let me know if it works for you.

Thanks