PHP Fatal error: Uncaught Error: Call to a member function get_price_html()

This topic has 2 replies, 2 voices, and was last updated 6 years, 7 months ago ago by Olga Barlow

  • Avatar: thisisbolo
    thisisbolo
    Participant
    April 6, 2018 at 16:23

    This comes up in the debug log after the recent theme update.

    PHP Fatal error: Uncaught Error: Call to a member function get_price_html() on boolean in /public_html/wp-content/themes/xstore/framework/theme-functions.php:1841
    Stack trace:
    #0 /public_html/wp-includes/class-wp-hook.php(286): etheme_ajax_search_action(”)
    #1 /public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
    #2 /public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /public_html/wp-admin/admin-ajax.php(112): do_action(‘wp_ajax_nopriv_…’)
    #4 {main}
    thrown in /public_html/wp-content/themes/xstore/framework/theme-functions.php on line 1841

    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 8, 2018 at 14:02

    Hello,

    We’ll fix it in next theme update. To fix it now find in xstoreframework/theme-functions.php file
    etheme_ajax_search_action() function http://prntscr.com/j22ny9
    Find $_product = wc_get_product( get_the_ID() ); replace by

    global $woocommerce;
    $_product = new WC_Product( get_the_ID() );

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.