Site broken due to a template error

Here is the message displayed when I open the site. It seems that the origin of the issue is the template of single-product that is in my child-theme.
I tried to restore an old version of single-product.php but the issue remains.
Could you help me please.

PS: the site is ok with woocommerce deactivated, but for sure I need it.

Fatal error : Uncaught Error: Call to a member function is_on_sale() on null in /home/brga7543/ Stack trace: #0 /home/brga7543/ include() #1 /home/brga7543/ wc_get_template(‘single-product/…’) #2 /home/brga7543/ woocommerce_show_product_sale_flash(‘’) #3 /home/brga7543/ WP_Hook->apply_filters(‘’, Array) #4 /home/brga7543/ WP_Hook->do_action(Array) #5 /home/brga7543/ do_action(‘woocommerce_bef…’) #6 /home/brga7543/ require(‘/home/brga7543/…’) #7 /home/brga7543/ in /home/brga7543/ on line 25

There has been a critical error on this website.

EDIT: when I deactivate child-theme, the site is back and everything runs well.