diff --git a/BitPayEddLib/class-bitpayinvoicefactory.php b/BitPayEddLib/class-bitpayinvoicefactory.php index 183e9b8..733e04a 100644 --- a/BitPayEddLib/class-bitpayinvoicefactory.php +++ b/BitPayEddLib/class-bitpayinvoicefactory.php @@ -34,7 +34,7 @@ private function get_notification_url(): string { } private function get_buyer(): Buyer { - if ( $this->get_edd_option( 'bitpay_checkout_capture_email' ) !== 1 ) { + if ( ! $this->get_edd_option( 'bitpay_checkout_capture_email' ) ) { return new Buyer(); } @@ -51,9 +51,9 @@ private function get_buyer(): Buyer { return $buyer_info; } - private function get_edd_option( string $option_name ): string { + private function get_edd_option( string $option_name ): ?string { global $edd_options; - return $edd_options[ $option_name ]; + return $edd_options[ $option_name ] ?? null; } }