PhP Notice/Warning messages
-
Howdy!
This is an easy one to brighten your day.
[11-Nov-2021 21:43:54 UTC] PHP Notice: Undefined variable: gateways in /home/…/wp-content/plugins/woo-stripe-payment/includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php on line 64
[11-Nov-2021 21:43:54 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/…/wp-content/plugins/woo-stripe-payment/includes/admin/meta-boxes/views/html-product-data.php on line 18Both are from the same cause:
private static function get_payment_gateways() { foreach ( self::$_gateways as $gateway ) { $gateways[ $gateway->id ] = $gateway; } return $gateways; }
As you can see, $gateways is not initialized. SHould be able to add:
$gateways = [];
before the foreach, and all should be fixed.Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PhP Notice/Warning messages’ is closed to new replies.