BSF_Envato_Activate::get_redirect_url( int $product_id = '' )

Get redirect URL.


Description


Parameters

$product_id

(int) (Optional) Product ID.

Default value: ''


Return

($current_url.)


Source

File: admin/bsf-core/class-bsf-envato-activate.php

	protected function get_redirect_url( $product_id = '' ) {

		if ( is_ssl() ) {
			$current_url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
		} else {
			$current_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
		}

		$current_url = esc_url( remove_query_arg( array( 'license_action', 'token', 'product_id', 'purchase_key', 'success', 'status', 'message' ), $current_url ) );

		if ( '' !== $product_id ) {
			$current_url = add_query_arg(
				array(
					'bsf-inline-license-form' => $product_id,
				),
				$current_url
			);
		}

		return $current_url;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.