Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 19 replies, has 2 voices.

Last updated by Prosenjit Barman 11 months, 4 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
December 5, 2023 at 4:54 am #14992667

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

The name of the Plugin is Wp PHPMyAdmin. Here is the link to the plugin: https://wordpress.org/plugins/wp-phpmyadmin-extension/

When I tried to access the database using this plugin, I encountered a 403 error. It seems some strict security policy is applied on your site/system which causing the error.

Could you let me know if you've had a chance to implement the workaround I mentioned in my previous message? Since bulk selecting and updating the product without making any changes seems to effectively resolve the issue, I'm hopeful it will serve as a suitable temporary solution. I look forward to hearing about your results.

Please feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

December 5, 2023 at 1:58 pm #14998669

nikolaosM

Well yes with your workaround we managed to solve our problem, but as you can understand nobody is going to manually update products since we have bought a plugin to do this job for us.

Also for your information, with the YITH support team we found out that the problem is related to chaching. Since the live site is on SiteGround the server company is promoting their cache plugin (Speed Optimizer: https://wordpress.org/plugins/sg-cachepress/) as the must use plugin for a faster environment. So after some troubleshouting we found out that this is the plugin that is causing the problem.

I will ask you, as I did to the YITH support, if there is a way to bypass the plugin when updating products' prices.

Thanks!

December 6, 2023 at 6:39 am #15003951

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for updating us on the situation.

I'm glad to hear that you've successfully identified the source of the problem.

Since the problem arises from the caching functionality of the Siteground Optimizer plugin, one possible solution could be to exclude the Admin area from being cached and then see if the issue continues. If this resolves the issue, you can then proceed to specifically exclude pages related to price displays instead of the entire backend, such as the YITH Bulk Update and the Product Edit page (wp-admin/post.php). Excluding these backend pages from caching might effectively address the issue at hand. This approach aims to ensure that the caching mechanism does not interfere with dynamic data updates in the backend.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

December 6, 2023 at 4:28 pm #15010497

nikolaosM

Hello,

The YITH support managed to find us a solution. The code snippet bellow goes in functions.php file of the active theme.

if ( ! function_exists( 'yith_wcbep_flush_cache_before_saving_variations' ) ) {
function yith_wcbep_flush_cache_before_saving_variations( $post_id ) {
if ( isset( $_REQUEST['security'], $_REQUEST['products_changes'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['security'] ) ), 'yith_wcbep_save_products_changes' ) ) {
$product = wc_get_product( $post_id );
if ( $product && $product->is_type( 'variation' ) ) {
wp_cache_flush();
$memcached = new SiteGround_Optimizer\Memcache\Memcache();
$memcached->remove_memcached_dropin();

SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
SiteGround_Optimizer\Supercacher\Supercacher::flush_memcache();
SiteGround_Optimizer\File_Cacher\File_Cacher::cleanup();
}
}
}

add_action( 'save_post', 'yith_wcbep_flush_cache_before_saving_variations', 99 );
}

Thanks for the help.

December 7, 2023 at 9:57 am #15015289

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Glad to hear that the issue is resolved now!

Thank you so much for sharing the code with us. Your contribution is greatly appreciated and will undoubtedly be of great help to others who have encountered a similar issue.

Feel free to let me know if there is anything else you need help with from our side. We will be happy to assist.

Best regards,
Prosenjit