[Resolved] GP Theme causing errors with Woocommerce

Home Forums Support GP Theme causing errors with Woocommerce

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1051013
    Louis Stanford

    Get the following errors repeating in the Customiser:

    Notice: Trying to get property ‘post_title’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 825
    Notice: Trying to get property ‘ID’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 825
    Notice: Trying to get property ‘ID’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 829

    Troubleshooting notes:
    – All plugins disabled except for GP Premium
    – Error disappears with Twenty Nineteen
    – Unedited WordPress installation

    Louis Stanford

    Then, when enabling Woocommerce, I get the following errors:

    Notice: product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/single-product.php’), wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_single_price, wc_get_template, include(‘/plugins/woocommerce/templates/single-product/price.php’), WC_Product_Variable->get_price_html, apply_filters(‘woocommerce_get_price_html’), WP_Hook->apply_filters, lw_hide_variation_price, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /home/sahpacoz/public_html/wp-includes/functions.php on line 4778

    Again, these errors disappear with Twenty Nineteen

    Customer Support

    Hi there,

    are you using a child theme with any custom functions or any code added via the Hook Element?

    Louis Stanford

    I can confirm that there are no custom functions/elements, also no code added via the hook element.

    I’ve also deleted the GeneratePress theme, re-uploaded from scratch to make sure that the files are original.

    Louis Stanford

    I’ve found a workaround (but haven’t found the cause):

    “That notice is appearing because there are some items in the Menu that are leading to WooCommerce, which is not installed. We suggest that you delete Shop pages from the Menu. You can install WooCommerce if you plan to use it in the future.

    Please navigate to Appearance> Menus and delete the invalid links related to the notice (in all menus).”

    I do have WooCommerce installed, but I did a cleanup of my defunct menus and the problem has disappeared.


    Lead Developer
    Lead Developer

    Glad you found the solution – it sounds like a bug in WooCommerce itself.

    The reason it went away when you switched themes is the menus are theme-specific and are reset on theme change.

    Thanks for sharing the fix! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.