Skip to content

Commit 71346e8

Browse files
authored
Fix the fatal error that occurs while processing a subscription renewal when the object is stored in the subscription's metadata.
1 parent 81fd2df commit 71346e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public function do_not_copy_order_meta( $order_meta ) {
448448
foreach ( (array) $order_meta as $index => $meta ) {
449449

450450
// this accounts for different versions of the Subscriptions filter running before and after WooCommerce Subscriptions 2.5
451-
if ( in_array( $index, $meta_keys ) || ( isset( $meta['meta_key'] ) && in_array( $meta['meta_key'], $meta_keys ) ) ) {
451+
if ( in_array( $index, $meta_keys ) || ( is_array( $meta ) && isset( $meta['meta_key'] ) && in_array( $meta['meta_key'], $meta_keys ) ) ) {
452452
unset( $order_meta[ $index ] );
453453
}
454454
}

0 commit comments

Comments
 (0)