mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix single product page extra fields in array format
This commit is contained in:
parent
75bbdb6635
commit
53bf234a4c
2 changed files with 29 additions and 10 deletions
|
@ -115,7 +115,11 @@ abstract class AbstractCartEndpoint implements EndpointInterface {
|
|||
|
||||
// Add extras to POST, they are usually added by custom plugins.
|
||||
if ( $product['extra'] && is_array( $product['extra'] ) ) {
|
||||
foreach ( $product['extra'] as $key => $value ) {
|
||||
// Handle cases like field[]
|
||||
$query = http_build_query( $product['extra'] );
|
||||
parse_str( $query, $extra );
|
||||
|
||||
foreach ( $extra as $key => $value ) {
|
||||
$_POST[ $key ] = $value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue