Title: php error get_type() null
Last modified: November 2, 2018

---

# php error get_type() null

 *  Resolved [rainsey](https://wordpress.org/support/users/rainsey/)
 * (@rainsey)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/php-error-get_type1-null/)
 * After updating woocommerce, we have the following error on our amp pages. All
   non amp pages work fine. Any fix?
 * <b>Fatal error</b>: Uncaught Error: Call to a member function get_type() on null
   in /home/thewoolr/public_html/wp-content/themes/zorka/lib/woocommerce-lib.php:
   244
    Stack trace: #0 /home/thewoolr/public_html/wp-includes/class-wp-hook.php(
   288): zorka_woocommerce_product_add_to_cart_text(‘Add to cart’) #1 /home/thewoolr/
   public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Add to cart’,
   Array) #2 /home/thewoolr/public_html/wp-content/plugins/woocommerce/includes/
   class-wc-product-simple.php(55): apply_filters(‘woocommerce_pro…’, ‘Add to cart’,
   Object(WC_Product_Simple)) #3 /home/thewoolr/public_html/wp-content/plugins/amp-
   woocommerce-pro/amp-woocommerce.php(134): WC_Product_Simple->add_to_cart_text()#
   4 /home/thewoolr/public_html/wp-content/plugins/amp-woocommerce-pro/include/styles_script.
   php(7): ampforwp_product_details_generator(‘array’) #5 /home/thewoolr/public_html/
   wp-includes/class-wp-hook.php(286): amp_woocommerce_pro_custom_style(Object(AMP_Post_Template))#
   6 /home/thewoolr/public_html/wp-includes/class-wp-hook.p in <b>/home/thewoolr/
   public_html/wp-content/themes/zorka/lib/woocommerce-lib.php</b> on line <b>244
   </b>
    -  This topic was modified 7 years, 7 months ago by [rainsey](https://wordpress.org/support/users/rainsey/).

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

 *  Thread Starter [rainsey](https://wordpress.org/support/users/rainsey/)
 * (@rainsey)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/php-error-get_type1-null/#post-10843460)
 * I fixed our php error by reinstalling the “Schema & Structured Data For WP” plugin.
   i previously installed this plugin and removed it as we use WPSSO pro.
 * Unfortunately, installing amp for wp and amp for woocommerce only causes the 
   php error due to installing the new structured data plugin using ampforwp > settings
   > structured data.
 * Please fix the php error caused when “Schema & Structured Data For WP” plugin
   is disabled or uninstalled. A reinstall of ampforwp and amp for woocommerce did
   not fix the issue.
 * thanks
 *  Plugin Contributor [ampforwp](https://wordpress.org/support/users/ampforwp/)
 * (@ampforwp)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/php-error-get_type1-null/#post-10843733)
 * Hi [@rainsey](https://wordpress.org/support/users/rainsey/),
 * That’s really strange and I have also tested it a lot by installing and disabling
   the Schema & Structured Data For WP but I am unable to recreate the issue – [http://take.ms/0hDbE](http://take.ms/0hDbE)
 * Will you please contact us on [team@magazine3.com](https://wordpress.org/support/topic/php-error-get_type1-null/team@magazine3.com?output_format=md)
   and we will look into it

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

The topic ‘php error get_type() null’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ampforwp](https://wordpress.org/support/users/ampforwp/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/php-error-get_type1-null/#post-10843733)
 * Status: resolved