pass current wp-admin path to WCCOM as url param (for "back" link)

This commit is contained in:
haszari 2019-07-12 14:50:14 +12:00
parent 3e7da11c30
commit 8c6a09e7e4
1 changed files with 2 additions and 0 deletions

View File

@ -483,8 +483,10 @@ 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'] ) ) : '';
return array(
'in-app-purchase-site' => site_url(),
'in-app-purchase-back' => $back_admin_path,
'in-app-purchase-woo-version' => WC_VERSION,
);
}