Title: Can&#8217;t enable CSS/JavaScript minification
Last modified: April 9, 2022

---

# Can’t enable CSS/JavaScript minification

 *  Resolved [Leandro](https://wordpress.org/support/users/leandroprz/)
 * (@leandroprz)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/)
 * After the last two plugin updates I noticed my website was slower and after checking
   your plugin settings I noticed CSS and JavaScript minification were disabled.
 * When loading `wp-admin/admin.php?page=sgo_frontend` I get this error:
 *     ```
       Error
       <p>Ha habido un error crítico en esta web.</p><p><a href="https://wordpress.org/support/article/faq-troubleshooting/">Aprende más sobre el diagnóstico de WordPress.</a></p>
       ```
   
 * When trying to enable CSS or JavaScript minification I get this error:
 *     ```
       Error
       No se puede activar Minimización CSS
       ```
   
 * I checked my debug.log file and these are the contents:
 *     ```
       [09-Apr-2022 17:44:35 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_cart_contents_total() on null in /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127
       Stack trace:
       #0 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()
       #1 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()
       #2 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()
       #3 /home/********/public_html/wp-includes/class-wp-hook.php(307): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}(Object(WP))
       #4 /home/******** in /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127
       [09-Apr-2022 17:46:10 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_cart_contents_total() on null in /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127
       Stack trace:
       #0 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()
       #1 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()
       #2 /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()
       #3 /home/********/public_html/wp-includes/class-wp-hook.php(307): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}(Object(WP))
       #4 /home/******** in /home/********/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127
       ```
   
 * Maybe `woocommerce-paypal-payments` is conflicting with the plugin?
    -  This topic was modified 4 years, 1 month ago by [Leandro](https://wordpress.org/support/users/leandroprz/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcant-enable-css-javascript-minification%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/page/2/?output_format=md)

 *  Plugin Support [Dimo Dimov](https://wordpress.org/support/users/dimodi/)
 * (@dimodi)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15543766)
 * Hello [@leandroprz](https://wordpress.org/support/users/leandroprz/),
 * There are no known compatibility issues between the WooCommerce Paypal Payments
   plugin and SiteGround Optimizer.
 * I tried to recreate the reported behavior and conducted some tests on a fresh
   WordPress application. I installed and activated the WooCommerce Paypal Payments
   plugin and confirmed that it is working perfectly fine with our SiteGround Optimizer.
   I was able to enable/disable the CSS and JavaScript minifications just fine and
   did not encounter any errors. This leads me to believe that the issue is most
   likely related to your application.
 * If you are using any additional plugins that offer similar minification features
   it is recommended to disable them. Make sure that your WordPress application 
   and all plugins are updated to the latest available release. You can also try
   reinstalling the SiteGround Optimizer and see if this would resolve the issue.
 * Best regards,
    Dimo
 *  Thread Starter [Leandro](https://wordpress.org/support/users/leandroprz/)
 * (@leandroprz)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15544781)
 * I’m not using a second cache plugin.
 * I disabled the PayPal plugin on my site and I was able to make SiteGround Optimizer
   work just fine. Maybe there’s something else conflicting. I’ll keep testing.
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549135)
 * I have the same issue and error message when viewing the admin page: /wp-admin/
   admin.php?page=sgo_frontend
 *  Plugin Support [Georgi Ganchev](https://wordpress.org/support/users/georgiganchev/)
 * (@georgiganchev)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549184)
 * Hello [@riseofweb](https://wordpress.org/support/users/riseofweb/),
 * Could you please confirm if you are experiencing the issue when directly navigating
   to the URL in your browser? Does the issue occur when directly navigating to 
   WordPress Dashboard > SG Optimizer > Frontend?
 * In addition could you please confirm if you are also running the plugin `woocommerce-
   paypal-payments` as reported in the initial thread?
 * If you are a SiteGround client could you please let me know your domain name 
   and the exact sequence of actions taken before you received this error on your
   end?
 * Best regards,
    Georgi Ganchev
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549276)
 * The error message appears when both navigating to or going directly to /wp-admin/
   admin.php?page=sgo_frontend
 * Yes, I have confirmed that I am and have the `woocommerce-paypal-payments` plugin
   activated.
 * I am using a subdomain hosted on SiteGround that I do not want to share publically
   because it contains proprietary information.
 * Here is my error message:
 *     ```
       11-Apr-2022 22:48:27 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_cart_contents_total() on null in .../public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127
       Stack trace:
       #0 .../public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()
       #1 .../public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()
       #2 .../public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()
       #3 .../public_html/wp-includes/class-wp-hook.ph in .../public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127
       ```
   
 *  Plugin Support [Georgi Ganchev](https://wordpress.org/support/users/georgiganchev/)
 * (@georgiganchev)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549322)
 * [@riseofweb](https://wordpress.org/support/users/riseofweb/)
 * Thank you for the details.
 * Could you please open a ticket through your SiteGround account and present the
   domain name in question there?
 * We would log a task to our developers but first, we would like to see the exact
   configuration set within the WooCommerce plugin in order to attempt and replicate
   it.
 * Please use this forum thread as a reference when posting the ticket. We appreciate
   your cooperation.
 * Best regards,
    Georgi Ganchev
 *  Thread Starter [Leandro](https://wordpress.org/support/users/leandroprz/)
 * (@leandroprz)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549437)
 * > I’ll keep testing.
 * Downgrading to WooCommerce PayPal Payments [v1.7.0](https://downloads.wordpress.org/plugin/woocommerce-paypal-payments.1.7.0.zip)
   fixes the issue.
 *  [Raquel](https://wordpress.org/support/users/keuls/)
 * (@keuls)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15549937)
 * I’m also having the same issue (and also have the WooCommerce PayPal Payments
   plugin).
 *  Plugin Support [Gergana Petrova](https://wordpress.org/support/users/gpetrova/)
 * (@gpetrova)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15550313)
 * Thank you for the update [@leandroprz](https://wordpress.org/support/users/leandroprz/),
   glad to know you were able to find a solution, albeit a temporary one.
 * We’re still unable to recreate the issue on our end with a vanilla WordPress 
   installation, however in case there is in fact a compatibility issue – we will
   do our best to address it as soon as possible.
 * Hello [@keuls](https://wordpress.org/support/users/keuls/), for us to further
   check the case – we will need to recreate it first and inspect the application,
   where the issue is present, in more details. If you’re SiteGround customer – 
   could you please provide us with your domain name or open a support request from
   your SiteGround account, providing the thread here as reference. Thank you in
   advance for the cooperation.
 * Best Regards,
    Gergana Petrova
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15551949)
 * I have confirmed the issue on another website that I have [https://www.americanlaserstudyclub.org](https://www.americanlaserstudyclub.org)
 * I have learned a little more about the issue that might help with troubleshooting.
   For me it only occurs if the PayPal method is enabled on the WooCommerce Payments
   screen “/wp-admin/admin.php?page=wc-settings&tab=checkout”
 *  Plugin Support [Plamen M](https://wordpress.org/support/users/plamenm/)
 * (@plamenm)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15552150)
 * Hello [@leandroprz](https://wordpress.org/support/users/leandroprz/) ,
 * Thank you for the update. I created a subdomain in your site (sgtest.americanlaserstudyclub.
   org/) and installed there: WordPress, WooCommerce, WooCommerce PayPal Payments.
   I activated them all. Then I went into the SiteGround Optimizer plugin and I 
   was able to activate both CSS and JavaScript Minification.
 * You can log into the newly installed test instance through Site Tools -> WordPress
   Installations .
 * Please, check the result. If you want us to test the issue on the site americanlaserstudyclub.
   org, then please post a support ticket so that our team can access the site and
   check the issue further for you.
 * Thank you.
 * [@keuls](https://wordpress.org/support/users/keuls/) We still expect more details
   from you. If you are also hosting your site with SiteGround, please also post
   a support ticket through the User Area of SiteGround, so that we can check the
   server logs for your site.
 * Regards,
    Plamen.M Tech Support Team SiteGround.com
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15552334)
 * I logged in to the sgtest.americanlaserstudyclub.org and added, setup, and enabled
   the PayPal payment gateway.
 * Now it gets the error again.
 * /wp-admin/admin.php?page=sgo_frontend
 *  Thread Starter [Leandro](https://wordpress.org/support/users/leandroprz/)
 * (@leandroprz)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15552365)
 * WooCommerce PayPal Payments support says there’s an issue in their plugin introduced
   in v1.7.1: [https://wordpress.org/support/topic/compatibility-issue-with-siteground-optimizer/#post-15551670](https://wordpress.org/support/topic/compatibility-issue-with-siteground-optimizer/#post-15551670)
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15552371)
 * Great. Thanks, [@leandroprz](https://wordpress.org/support/users/leandroprz/)
   for the update. I will revert to the previous version of WooCommerce PayPal Payments.
 *  Plugin Support [Plamen M](https://wordpress.org/support/users/plamenm/)
 * (@plamenm)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/#post-15552400)
 * Indeed, thank you for the update, [@leandroprz](https://wordpress.org/support/users/leandroprz/).
   I will pass this information to our Plugin Developers.
 * Best Regards,
    Plamen.M Tech Support Team SiteGround.com

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/page/2/?output_format=md)

The topic ‘Can’t enable CSS/JavaScript minification’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [minification](https://wordpress.org/support/topic-tag/minification/)
 * [plugin conflict](https://wordpress.org/support/topic-tag/plugin-conflict/)

 * 17 replies
 * 7 participants
 * Last reply from: [Plamen M](https://wordpress.org/support/users/plamenm/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/cant-enable-css-javascript-minification/page/2/#post-15552668)
 * Status: resolved