woocommerce/includes/tracks
Nestor Soriano 52eed70f04 Add a 'NumberUtil' class with a 'round' method.
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.

This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
..
events update deprecation versions to 4.6.0 2020-09-18 13:16:46 -03:00
class-wc-site-tracking.php remove WC_Admin_Setup_Wizard_Tracking from tracking classes 2020-09-18 15:26:18 -03:00
class-wc-tracks-client.php Add a 'NumberUtil' class with a 'round' method. 2020-10-01 11:08:51 +02:00
class-wc-tracks-event.php Improve choice of words 2020-08-25 18:03:03 -03:00
class-wc-tracks-footer-pixel.php Set Tracks image position to fixed 2019-06-18 13:05:30 +02:00
class-wc-tracks.php Protect _ui and _ut props, move JS filter below product count 2020-03-16 17:00:25 -07:00