Answer the question
In order to leave comments, you need to log in
How to force js update in WooCommerce?
Recently plunged into the world of Wordpress! (very controversial impression, even after Bitrix). The browser caches everything. I figured out the files of my theme by adding microdata to the version of the file.
Faced the "cart update" bug in WooCommerce, googled the solution, I need to change the plugin file. Made!!!! Uploading old files! what he just didn’t do: completely cleared the browser, came from other browsers. Nothing works, loads the old file. Physically deleted the file from the server along the path from the console, does not help.
How to update plugin js? Please tell me, I'm very nervous!
Answer the question
In order to leave comments, you need to log in
The cache plugin is not worth it.
I'm aware of this ...
Can you tell me?
Problem updating cart.
In the console, I remove the disabled parameter, everything works. In php the button is written without disabled. Accordingly, disabled adds the plugin script. (which was advised to clean). Do you really need to clean the button with your own script, can anyone come across?
UPD: Solution. My. (I consider it a wild crutch)
$(".button_update").prop( "disabled", null );
$( document.body ).on( 'updated_cart_totals', function() {
$(".button_update").prop( "disabled", null );
} );
Do you have a caching plugin in WP? If yes, then you need to clean it.
It's bad practice to edit the plugin itself, after updating the plugin everything will crash.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question