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!