mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix the wrong return url in multisite setup
This commit is contained in:
parent
ffe3a0b958
commit
80b5abda15
2 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ class ApplicationContextRepository {
|
||||||
$payment_preference = $this->settings->has( 'payee_preferred' ) && $this->settings->get( 'payee_preferred' ) ?
|
$payment_preference = $this->settings->has( 'payee_preferred' ) && $this->settings->get( 'payee_preferred' ) ?
|
||||||
ApplicationContext::PAYMENT_METHOD_IMMEDIATE_PAYMENT_REQUIRED : ApplicationContext::PAYMENT_METHOD_UNRESTRICTED;
|
ApplicationContext::PAYMENT_METHOD_IMMEDIATE_PAYMENT_REQUIRED : ApplicationContext::PAYMENT_METHOD_UNRESTRICTED;
|
||||||
$context = new ApplicationContext(
|
$context = new ApplicationContext(
|
||||||
network_home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) ),
|
home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) ),
|
||||||
(string) wc_get_checkout_url(),
|
(string) wc_get_checkout_url(),
|
||||||
(string) $brand_name,
|
(string) $brand_name,
|
||||||
$locale,
|
$locale,
|
||||||
|
|
|
@ -36,7 +36,7 @@ class ApplicationContextRepositoryTest extends TestCase
|
||||||
->andReturn($value);
|
->andReturn($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
expect('network_home_url')
|
expect('home_url')
|
||||||
->andReturn('https://example.com/');
|
->andReturn('https://example.com/');
|
||||||
expect('wc_get_checkout_url')
|
expect('wc_get_checkout_url')
|
||||||
->andReturn('https://example.com/checkout/');
|
->andReturn('https://example.com/checkout/');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue