Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Developer DocumentationFormidable Hooks
frm_paypal_sdk_url_query_args

frm_paypal_sdk_url_query_args

This hook lets you customize the query args added to the PayPal SDK script URL before it's loaded. Use it to remove specific funding sources (like Venmo) from the front end, or override values like buyer country for testing. Added in version 6.31.

Usage

php

add_filter( 'frm_paypal_sdk_url_query_args', 'your_function_name', 10, 2 );

Parameters

  • $query_args (array) The query args being added to the PayPal SDK URL. Includes keys like client-id, intent, currency, merchant-id, enable-funding, components, and conditionally vault, disable-funding, and locale.
  • $action (WP_Post) The payment action post object.

Examples

Remove Venmo from the front end

php

add_filter(
	'frm_paypal_sdk_url_query_args',
	function ( $args ) {
		// Disable Venmo by removing it from enable-funding.
		if ( ! empty( $args['enable-funding'] ) ) {
			$args['enable-funding'] = trim( str_replace( 'venmo', '', $args['enable-funding'] ), ',' );
		}

		return $args;
	}
);

Set a specific buyer country for testing (Venmo requires a US buyer country)

php

add_filter(
	'frm_paypal_sdk_url_query_args',
	function ( $args ) {
		$args['buyer-country'] = 'US';
		return $args;
	}
);
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms