Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CRITICAL Uncaught Error: Call to a member function is_on_sale() on null in Woocommerce

I got error "CRITICAL Uncaught Error: Call to a member function is_on_sale() on null in sale-flash.php in Woocommerce". Can Anyone help me to resolve this issue? Here is my store url: https://jalaj.aphroecs.com/newbooboo/shop/

like image 403
Jalaj Kumar Avatar asked Oct 19 '25 01:10

Jalaj Kumar


1 Answers

The store URL doesn't help in that case.

It seems related to a Woocommerce template overrides in your theme that is outdated.

You should check in Woocommerce > Status at the end of the page in "Template Overrides" section at the end, to see if there is some outdated Woocommerce templates in your theme (in red).

If it is the case, you will need to update your theme, or to replace the corresponding template file, copying it:

  • from Woocommerce plugin > templates > single-product > sale-flash.php
  • To your active theme > woocommerce > single-product > sale-flash.php

This should solve this issue.

like image 149
LoicTheAztec Avatar answered Oct 21 '25 16:10

LoicTheAztec