fbpx
Enjoy Year-End Sale: 50% Off All Plugins! Coupon Code: NewYear2025

Kovacs Balazs

I am attaching two screenshots. Where the extension is not active, the page is faster and the content appears properly on the shop page after the product price, and on the product page the gallery is displayed immediately.

When the extension is active, the page is quite slow, it first loads the text after the price of the product on the shop page, then deletes it, and there is quite a lot of sliding on the product page before the gallery is in place. Until it is in place, it is at the bottom of the page and stretches the page, which is why you have to scroll a lot for the footer and related products…

Thanks in advance for your help!

Kovacs Balazs

How can I send screenshots? Unfortunately, it does not allow you to attach.

Hakik Zaman

Hi Kovacs,

Thanks for getting back to us.

When the extension is active, the page is quite slow

=> How many approximate variations do you have with each product?

=> How many products do you display on the first load?

How can I send screenshots?

I recommend https://snipboard.io for easily sharing screenshots – please follow the instructions on that page, then paste the URL in this thread.

Thank You

Kovacs Balazs

Hi Zaman,

4 products appear, there are so many products in total in the shop and each of them has 8 variations, 8 colors.

Also, there is another problem that when you load with odl, the text behind the price appears well on the shop page, but it disappears after 1-2 seconds. This phenomenon only occurs when the extension is active.

Thanks in advance!

Hakik Zaman

Hi Kovacs,

Unfortunately, I couldn’t access the link – https://paste.pics/S4CO3

Please increase the variation threshold like this- https://paste.pics/S4CO9

Then try again. Hope to hear from you soon.

Thank You

Kovacs Balazs

Hi Zaman,

I’m sorry, there was a technical issue with my server. Please try to access it again. I checked and it should be fine.

What you sent another screenshot, I will raise it to 10. What exactly does this solve?

The most important thing would be that the text after the price does not disappear on the shop page.

Thanks in advance!

Hakik Zaman

Hi Kovacs,

Do you have a country/IP restriction?

Your site is not working from my side- https://paste.pics/S4ESI & https://paste.pics/S4ESN

What you sent another screenshot, I will raise it to 10. What exactly does this solve?

Our plugin retrieves data using API calls. Using 10, it will not call API for those products that have up to 10 variations. If your server is already busy with other responses, it could slow down your site.

Please increase the threshold as I requested in my last reply. Then try again.

Hope to hear from you soon.

Thank You

Kovacs Balazs

Hi Zaman,

thank you very much for the quick reply!

I added 10, the page is a bit faster, maybe it will be fine that way. Can we do something about too many autoloads?

–––

I don’t know if the website’s server filters for any IP, but if you do, please try using a Hungarian VPN, or send me your IP address and I’ll let the host know.

My NAS server only allows access with IPs from Hungary and Ireland, the problem could be there. I took two screenshots. The part underlined in red is to make the extension disappear.

Hakik Zaman

Hi Kovacs,

We are from Bangladesh. My IP is 116.204.155.46

The part underlined in red is to make the extension disappear.

I recommend https://snipboard.io for easily sharing screenshots – please follow the instructions on that page, then paste the URL in this thread.

Thank You

Hakik Zaman

Hi Kovacs,

You have added custom text with prices.

Our plugin replaces the price when you select a swatch and displays the corresponding variation price.

To disable this behavior, you can remove this wrapper- https://paste.pics/S4G30

But, in that case, the images will not change after selecting swatch on the archive.

A solution is modifying the class. Rename price class to some-price

Our plugin searches for price class and displays the variation price based on it. If you rename it, it will not change the price and the custom text will be visible.

If you want the custom text with the variation price, then try the following snippet:

add_filter( 'woo_variation_swatches_get_available_variation', function( $available_variation, $variation, $product, $wvs_archive_page ){$available_variation['price_html'] = $variation->get_price_html() . 'YOUR_CUSTOM_TEXT'; // Replace YOUR_CUSTOM_TEXT with your desired function/character.
return $available_variation; 
}, 10, 4 );

Please check the comment inside the snippet to modify it as per your need.

Thank You

Kovacs Balazs

Hi Zaman, thank you for the quick and really personal answer!

I modified the snippet that you suggested, so things are fine with me, but are there any objections that could interfere with the extension, or other insights on the modified code?

function my_custom_variation_price_html( $available_variation, $variation, $product, $wvs_archive_page ) {
$acf_field_name = ‘ar_mogotti_szoveg’;$custom_text = get_field( $acf_field_name, $variation->ID );if ( $custom_text ) {
$available_variation[‘price_html’] = $variation->get_price_html() . ‘ ‘ . $custom_text;
}

return $available_variation;
}

add_filter( ‘woo_variation_swatches_get_available_variation’, ‘my_custom_variation_price_html’, 10, 4 );

Thanks in advance!

Hakik Zaman

Hi Kovacs,

We don’t recommend modifying the code of WooCommerce & Variation Swatches.

As it is required for you, I just wanted to help. Though it is beyond our support scope. 🙂

Don’t worry, it will not interfere with our plugin’s code. Unless you encounter an issue with the ACF field.

Lastly, we get excited & honored when you use our plugin on your site.

If you found my support 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