diff --git a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php index 105df9075..bec116e14 100644 --- a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php +++ b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php @@ -448,7 +448,7 @@ public function do_not_copy_order_meta( $order_meta ) { foreach ( (array) $order_meta as $index => $meta ) { // this accounts for different versions of the Subscriptions filter running before and after WooCommerce Subscriptions 2.5 - if ( in_array( $index, $meta_keys ) || ( isset( $meta['meta_key'] ) && in_array( $meta['meta_key'], $meta_keys ) ) ) { + if ( in_array( $index, $meta_keys, true ) || ( is_array( $meta ) && isset( $meta['meta_key'] ) && in_array( $meta['meta_key'], $meta_keys, true ) ) ) { unset( $order_meta[ $index ] ); } }