woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Calling wp_timezone() results in fatal error for WordPress < 5.3 #855

Closed helgatheviking closed 3 years ago

helgatheviking commented 3 years ago

Describe the bug

wp_timezone() was introduced into the plugin. But wp_timezone() was not introduced in WordPress until version 5.3. This results in a fatal error.

Initially reported at wordpress.org forums.

To reproduce

I'm a bit of the relay here, but I assume that it is reproducable by activating the latest version of the plugin with an older version of WordPress... initial reporter is on 4.9.

Expected behavior

Either bump the min required version of WordPress or use a version check before calling wp_timezone().