Title: Rest API Error When WooCommerce Active
Last modified: October 24, 2021

---

# Rest API Error When WooCommerce Active

 *  Resolved [meir321](https://wordpress.org/support/users/meir321/)
 * (@meir321)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/)
 * Hi, when Woocommerce is active I am getting this error in the SiteGround plugin:
 * “Either a security plugin, custom function or rules in your .htaccess file is
   preventing the WordPress REST API from working properly. SiteGround Optimizer
   is using it to store its options and other functionalities so please make sure
   it works properly.”
 * When WooCommerce Is disabled I am not getting the error.
 * Please advise.
    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Stoyan Georgiev](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15002167)
 * Hey there [@meir321](https://wordpress.org/support/users/meir321/)
 * Are you using any Woocommerce addons? If you are make sure that they are not 
   blocking access to the REST API. If you are using any, you can try to disable
   them one by one in order to locate the exact one.
 * If however, this is not the case, please provide a site URL, so we ca troubleshoot
   the issue further.
 * Kind regards,
    Stoyan
 *  Thread Starter [meir321](https://wordpress.org/support/users/meir321/)
 * (@meir321)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15004015)
 * Hi, I disabled all Woocommerce addons and I am still getting the same error unless
   I disable Woocommerce.
 * My site is compudime.com.
 * Thank you
 *  Plugin Author [Stoyan Georgiev](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15006194)
 * Hey there [@meir321](https://wordpress.org/support/users/meir321/),
 * Would it be possible to test with a different theme, so we can exclude the possibility
   of the theme having issues with the REST API?
 * Kind regards,
    Stoyan
 *  Thread Starter [meir321](https://wordpress.org/support/users/meir321/)
 * (@meir321)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15009897)
 * Hi, will I use my theme settings when I temporarily disable it? As an aside, 
   I always had this theme and didn’t notice this issue until now.
 *  Plugin Author [Stanimir Stoyanov](https://wordpress.org/support/users/sstoqnov/)
 * (@sstoqnov)
 * SiteGround Representative
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15010309)
 * Hey [@meir321](https://wordpress.org/support/users/meir321/)
 * There is an issue with your theme.
 *     ```
       PHP Fatal error:  Uncaught Error: Call to a member function get_cart_contents_count() on null in /public_html/wp-content/themes/go/includes/woocommerce.php:361
       ```
   
 * Please contact the theme developers for assistance.
 * Regards,
    Stanimir
 *  Thread Starter [meir321](https://wordpress.org/support/users/meir321/)
 * (@meir321)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15012030)
 * I will contact them, thank you
 *  Thread Starter [meir321](https://wordpress.org/support/users/meir321/)
 * (@meir321)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15029553)
 * Hi, the theme developer does not see the error. can you please let me know when
   you see this error?
 * Thank you

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Rest API Error When WooCommerce Active’ 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/)

 * 7 replies
 * 3 participants
 * Last reply from: [meir321](https://wordpress.org/support/users/meir321/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/rest-api-error-when-woocommerce-active/#post-15029553)
 * Status: resolved