diff --git a/modules/ppcp-api-client/src/ApiModule.php b/modules/ppcp-api-client/src/ApiModule.php index 62e18373f..f12e69668 100644 --- a/modules/ppcp-api-client/src/ApiModule.php +++ b/modules/ppcp-api-client/src/ApiModule.php @@ -50,7 +50,7 @@ class ApiModule implements ModuleInterface { foreach ( $data['purchase_units'] as $purchase_unit_index => $purchase_unit ) { foreach ( $purchase_unit['items'] as $item_index => $item ) { $data['purchase_units'][ $purchase_unit_index ]['items'][ $item_index ]['name'] = - apply_filters( 'woocommerce_paypal_payments_cart_line_item_name', $item['name'], $item['cart_item_key'] ); + apply_filters( 'woocommerce_paypal_payments_cart_line_item_name', $item['name'], $item['cart_item_key'] ?? null ); } }