php – Warning: A non-numeric value encountered?

Question

Hi everyone after transferring my site to another hosting I get this error: (php 7.4 on both hosts)
“Warning: A non-numeric value encountered in /htdocs/example.com/wp-content/themes/themename/woocommerce/taxonomy-product_cat.php on line 159”

the code on line 159 is the following:

     $discount = round (intval($sale_price  / $regular_price ) * floatval (100));

where am i wrong?

Thanks for help me

0
DjCanigia 2 months 2021-09-19T15:51:40-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse