Here we will cover how to solve the issue when the "Add Media" button isn't working within WooCommerce or WordPress
From WooCommerce, the issue can be seen when trying to add a new product in the "products" section. The button to add a new product does not respond. It can also cause the Add Media button to be unresponsive.
There usually isn't a specific error associated with this issue, the buttons simply do not work.
This issue is caused by a script/function executing before another script/function executes, and is often caused by a plugin changing the order of script execution due to concatenation.
We can fix the issue by adding code to the wp-config.php file.
Related Articles
WordPress HTTP Error when Uploading Images
File Type Not Supported Error in WordPress
Enable and Configure Debugging for WordPress
Disabling Script Concatenation
- Log into cPanel
- Locate the Document Root of the domain
- Open File Manager in the Files section
- Enter the Document Root of the website
- Locate the wp-config.php file
- Right-click on the file and select Edit
- Right-click on the file and select Edit
- Locate the line that says "Add any custom values between this line and the "stop editing" line."
- Add the following line of code to that section:
define('CONCATENATE_SCRIPTS', false );
- Add the following line of code to that section:
- Save the file by clicking Save Changes on the top-right of the screen
- Refresh the page after clearing browser cache and NGINX cache (if applicable) and the button should work
Comments
0 comments
Article is closed for comments.