Home Forums Basel support forum PHP Fatal Errors slowing site down

PHP Fatal Errors slowing site down

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11630

    Creationsphere
    Participant

    Hi, I have been developing a site with the Basel theme. I love the theme but it has been extremely slow.

    Tonight I have found a problem… the site document (using Chrome Developer Tools) was producing a 500 internal server error. I turned on php debugging and found the following…

    [02-Apr-2017 20:28:23 UTC] PHP Fatal error:  Call to undefined function wc() in /home/greenfin/public_html/wp-content/themes/basel/inc/shortcodes.php on line 2856
    [02-Apr-2017 20:29:52 UTC] PHP Fatal error:  Call to undefined function wc() in /home/greenfin/public_html/wp-content/themes/basel/inc/shortcodes.php on line 2858

    These two lines are producing a fatal php error

    $ordering_args = WC()->query->get_catalog_ordering_args( $orderby, $order );
    $meta_query   = WC()->query->get_meta_query();

    I am still getting a 2-4 second delay on page load, but the 500 error is gone after removing these lines, and the site seems faster. Could you please tell me code to fix these lines? Thanks!

    #11631

    Artem Temos
    Keymaster

    Hello,

    Be sure that you have the latest version of WooCommerce installed and activated on your website. These errors say that function WC is undefined. And they can appear only in case WooCommerce core files are missed since WC() is a main function from the plugin.

    Regards

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