I have a problem, woocommerce does not display the product, in the console it writes 500 error. How can I fix it, tell me pzhl.

In which files can you edit and redefine the WooCommerce functions? How can I catch the moment of payment?

  • Watch logs above all - SeVlad
  • @SeVlad looked at the logs, the error Call to undefined method comes out WooCommerce :: get_image_size (), theme shopDock, after updating the Woocommerce plugin this error appeared - DoctorDo

3 answers 3

The woocommerce get_image_size function is outdated and replaced by wc_get_image_size . The latest versions of woocomerce do not contain get_image_size , so calling this function from your theme ends with a fatal error.

Apparently, the site has not been updated for a long time.

Options 3, in fact.

  1. (Preferred) Update the topic. The developers have already replaced the call of the outdated function.
  2. Roll back the WooCommerce version
  3. Manually in the theme files replace the get_image_size calls with wc_get_image_size (but you also need to understand what you are doing)

    Most likely you have a PHP error, in order to understand where the problem is, in the wp-config.php activate WP_DEBUG and set define( 'WP_DEBUG', true );

    • Is it possible to edit wp-config in the admin panel, I do not have access to the server where the application is located, can I open it through the admin panel? - DoctorDo
    • @DoctorDo cannot be edited through the admin panel (as far as I remember), you can install the plugin and after activating, edit this file here link ru.wordpress.org/plugins/wp-config-file-editor - Arsen
    • Nothing can be edited from the admin. Without the risk of breaking the site. Only through FTP in the correct notebooks! - SeVlad
    • @SeVlad - I completely agree, but DoctorDo will not even be able to view the logs because he said that there is no access to the host ... - Arsen
    • @DoctorDo - all the same you need to get access to the hosting ... - Arsen

    I took access, looked at the logs, an error appears, this error appeared after updating the Woocommerce plugin

     Call to undefined method WooCommerce::get_image_size() [Fri Feb 10 09:25:57 2017] [error] PHP Fatal error: Call to undefined method WooCommerce::get_image_size() 
    • And then it is written exactly where. Surely there is a topic shows. Is the topic purchased or "free" from the dustbin downloaded ?. If the topic is legal - update. But no - buy or change to safe - SeVlad
    • Theme is free and legal - DoctorDo
    • Themes are not in the wordpress.org/themes/search/ShopDock catalog. because it is paid themify.me/themes/shopdock . - SeVlad
    • @SeVlad in which files can you override the WooCommerce functions? - DoctorDo
    • Yes, and where does the override? There is a problem here. And not one. There are shells / viruses in it, first of all. And secondly - non-working functions. - SeVlad