mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
🐛 Fix the partner-referral payload to pass tests
This commit is contained in:
parent
42986980f6
commit
05b4baec15
1 changed files with 5 additions and 0 deletions
|
@ -142,6 +142,11 @@ class PartnerReferralsData {
|
|||
*/
|
||||
$payload = apply_filters( 'ppcp_partner_referrals_data', $payload );
|
||||
|
||||
// An empty array is not permitted.
|
||||
if ( isset( $payload['capabilities'] ) && ! $payload['capabilities'] ) {
|
||||
unset( $payload['capabilities'] );
|
||||
}
|
||||
|
||||
// Add the nonce in the end, to maintain backwards compatibility of filters.
|
||||
$payload['partner_config_override']['return_url'] = add_query_arg(
|
||||
array( 'ppcpToken' => $onboarding_token ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue