۴- Using Plugin to Stop WooCommerce Admin Ajax Calls
If you are not familiar with modifying theme’s file or creating child theme then there is a free plugin to do the work for you. Install and activate “Disable Cart Fragments” plugins from your WordPress admin panel.
This plugin does not have any settings page. Simply activating the plugin will disable the WooCommerce cart fragmentation on all pages of the site. If you want to disable the script only on particular pages then add the below code in your wp-config.php file.
ID-1, ID-2 and ID-3 are the post or page IDs.
Remember you should disable “Enable Ajax add to cart buttons on archives” and enable “Redirect to the cart page after successful addition” as explained in the above sections.
دیگر پلاگین های مناسب جهت رفع ارور های ووکامرس
Disable Cart Fragments recommends the following free plugins:
Disable WooCommerce Status Install now!
Completely disables the WooCommerce Status widget in the WP Admin dashboard to greatly improve backend performance on high traffic WooCommerce shops.
Disable WooCommerce Styles Install now!
Completely disables all of the CSS stylesheets that are loaded by WooCommerce in order that styling can be better managed by a single style.css file.
Remove Query Strings Install now!
Removes all query strings from static resources meaning that proxy servers and beyond can better cache your site content (plus, better SEO scores).
Disable Embeds Install now!
Disables both external and internal embedding functions to avoid slow page render, instability and SEO issues, and to improve overall loading speed.
Disable XML-RPC Install now!
Completely disables all XML-RPC related functions in WordPress including pingbacks and trackbacks, and helps prevent attacks on the xmlrpc.php file.
Disable Emojis Install now!
Force HTTPS Install now!
Redirects all HTTP requests to the HTTPS version and fixes all insecure static resources without altering the database (also works with CloudFlare).
Server Status Install now!
Useful statistics about the server OS, CPU, RAM, load average, memory usage, IP address, hostname, timezone, disk space, PHP, MySQL, caches, etc.
۴۰۴ To Homepage Install now!
Redirects all 404 (Not Found) errors to the homepage for a better user experience, less abuse from bots, and 100% elimination of Google GSC warnings.
Disable Author Pages Install now!
Completely disables the category base from all URLs generated by WordPress so that there is no category slug displayed on archive permalinks, etc.
روش نصب افزونه Disable Cart Fragments ( غیر فعال سازی Fragments سبد خرید
- Upload to
- Activate via WP Admin > Plugins
- Test the plugin by refreshing pages and checking source code after clearing caches
To disable cart fragments on specific posts/pages (using their ID), refer to below defined constant: