mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Remove www
in domain
This commit is contained in:
parent
fe5a8a968f
commit
424b9ea916
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ class SdkClientToken {
|
|||
|
||||
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
||||
$domain = wp_unslash( $_SERVER['HTTP_HOST'] ?? '' );
|
||||
$domain = preg_replace( '/^www\./', '', $domain );
|
||||
|
||||
$url = trailingslashit( $this->host ) . 'v1/oauth2/token?grant_type=client_credentials&response_type=client_token&intent=sdk_init&domains[]=' . $domain;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue