use add_query_arg to determine current page url
This commit is contained in:
parent
f97fa34c01
commit
dab7cb328a
|
@ -483,10 +483,12 @@ class WC_Admin_Addons {
|
|||
* Returns in-app-purchase URL params.
|
||||
*/
|
||||
public static function get_in_app_purchase_url_params() {
|
||||
$back_admin_path = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
||||
// Get url (from path onward) for the current page,
|
||||
// so WCCOM "back" link returns user to where they were.
|
||||
$back_admin_path = add_query_arg( array() );
|
||||
return array(
|
||||
'in-app-purchase-site' => site_url(),
|
||||
'in-app-purchase-back' => $back_admin_path,
|
||||
'in-app-purchase-back' => esc_url( $back_admin_path ),
|
||||
'in-app-purchase-woo-version' => WC_VERSION,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue