From 5340575377eaeb15a9f6a65c7d45d3e0feea71c1 Mon Sep 17 00:00:00 2001 From: frosso Date: Fri, 8 Nov 2024 18:08:42 +0100 Subject: [PATCH] fix: E_DEPRECATED on BNPL empty PMME --- 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 a3e61337d3f..d236abc0fd4 100644 --- a/includes/class-wc-payments.php +++ b/includes/class-wc-payments.php @@ -1887,7 +1887,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' ); } }