diff --git a/readme.txt b/readme.txt index d1ffa54..675bbfe 100644 --- a/readme.txt +++ b/readme.txt @@ -92,6 +92,7 @@ Yes! Pagespeed is one of our main focus points, and we strive to make the plugin Enhancements: Bugfixes: +* Fixes an error when no payment gateways are defined. Other: diff --git a/src/Integration/WooCommerce.php b/src/Integration/WooCommerce.php index 3c1279d..13cb730 100644 --- a/src/Integration/WooCommerce.php +++ b/src/Integration/WooCommerce.php @@ -248,7 +248,7 @@ public function get_global_data( array $global_data ): array { return $global_data; } - private function get_payment_method(): string { + private function get_payment_method(): ?string { $payment_method = WC()->session->get( 'chosen_payment_method' );