From c17812ee26b7663c7e81895657cc65950905b720 Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 11 Nov 2024 15:57:16 +0100 Subject: [PATCH] fix: E_DEPRECATED on BNPL empty PMME (#9689) --- changelog/fix-deprecated-message-on-empty-pmme | 4 ++++ includes/class-wc-payments.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/fix-deprecated-message-on-empty-pmme diff --git a/changelog/fix-deprecated-message-on-empty-pmme b/changelog/fix-deprecated-message-on-empty-pmme new file mode 100644 index 00000000000..ffaee24b5d1 --- /dev/null +++ b/changelog/fix-deprecated-message-on-empty-pmme @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +fix: E_DEPRECATED on BNPL empty PMME diff --git a/includes/class-wc-payments.php b/includes/class-wc-payments.php index 264cf340c64..17393c38dd9 100644 --- a/includes/class-wc-payments.php +++ b/includes/class-wc-payments.php @@ -1888,7 +1888,7 @@ public static function load_stripe_bnpl_site_messaging() { if ( ! $is_subscription ) { require_once __DIR__ . '/class-wc-payments-payment-method-messaging-element.php'; $stripe_site_messaging = new WC_Payments_Payment_Method_Messaging_Element( self::$account, self::$card_gateway ); - echo wp_kses( $stripe_site_messaging->init(), 'post' ); + echo wp_kses( $stripe_site_messaging->init() ?? '', 'post' ); } }