Title: Fatal error when using shortcode
Last modified: August 21, 2016

---

# Fatal error when using shortcode

 *  [marcsoler](https://wordpress.org/support/users/marcsoler/)
 * (@marcsoler)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/)
 * When I insert the `[product_category]` shortcode, I get the following error on
   saving the content:
 * > Fatal error: Call to a member function get_cart() on a non-object in (…) /framework/
   > woo-config.php on line 425
 * The page is saved but the shortcode itself is displayed in a bad grid format.
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

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

 *  Thread Starter [marcsoler](https://wordpress.org/support/users/marcsoler/)
 * (@marcsoler)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/#post-4985516)
 * I’m using the Avada theme but this file isn’t an overridden file
 *  [terrytsang](https://wordpress.org/support/users/terrytsang/)
 * (@terrytsang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/#post-4985517)
 * There are two product category shortcodes:
 * 1. Show multiple products in a category by slug (example: gift).
 *     ```
       [product_category category="gift"]
       ```
   
 * 2. Display product categories loop
 *     ```
       [product_categories number="12" parent="0"]
       ```
   
 * _* Set the parent paramater to 0 to only display top level categories._
 *  Thread Starter [marcsoler](https://wordpress.org/support/users/marcsoler/)
 * (@marcsoler)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/#post-4985521)
 * I know… but the error appears on any WooCommerce shortcode I use the moment I
   save the page…
 *  [terrytsang](https://wordpress.org/support/users/terrytsang/)
 * (@terrytsang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/#post-4985529)
 * Hi, i think Avada child theme has some code in there, or a template override,
   which has broken it. I would suggest you change to other theme and have a try
   again.

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

The topic ‘Fatal error when using shortcode’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 4 replies
 * 2 participants
 * Last reply from: [terrytsang](https://wordpress.org/support/users/terrytsang/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-using-shortcode-1/#post-4985529)
 * Status: not resolved