mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add tests
This commit is contained in:
parent
7b07d2aef5
commit
2a033d3f5f
3 changed files with 199 additions and 5 deletions
|
@ -132,12 +132,15 @@ class ExperienceContextBuilder {
|
|||
public function with_current_landing_page(): ExperienceContextBuilder {
|
||||
$builder = clone $this;
|
||||
|
||||
$landing_page = $this->settings->has( 'landing_page' ) ?
|
||||
(string) $this->settings->get( 'landing_page' )
|
||||
: ExperienceContext::LANDING_PAGE_NO_PREFERENCE;
|
||||
if ( empty( $landing_page ) ) {
|
||||
$landing_page = ExperienceContext::LANDING_PAGE_NO_PREFERENCE;
|
||||
}
|
||||
|
||||
$builder->experience_context = $builder->experience_context
|
||||
->with_landing_page(
|
||||
$this->settings->has( 'landing_page' ) ?
|
||||
(string) $this->settings->get( 'landing_page' )
|
||||
: ExperienceContext::LANDING_PAGE_NO_PREFERENCE
|
||||
);
|
||||
->with_landing_page( $landing_page );
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue