Merge pull request #1703 from woocommerce/PCP-2021-warning-prevents-payments-on-pay-for-order-page-when-debugging-is-enabled

Warning prevents payments on Pay for Order page when debugging is enabled (2021)
This commit is contained in:
Emili Castells 2023-09-19 12:44:05 +02:00 committed by GitHub
commit 4c803fc792
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 );
}
}