gform_stripe_url_port

Description

Set the Stripe URL port if it’s not 80.

Usage

$server_port = apply_filters( 'gform_stripe_url_port', $_SERVER['SERVER_PORT'] );

Parameters

  • $server_port string

    Default server port.

Example

$server_port = apply_filters( 'gform_stripe_url_port', $_SERVER['SERVER_PORT'] );

if ( $server_port != '80' ) {
$page_url .= $_SERVER['SERVER_NAME'] . ':' . $server_port . $_SERVER['REQUEST_URI'];
} else {
$page_url .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Stripe 3.0.

Source Code

This filter is located in class-gf-stripe.php.