mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not sent empty brand name
causes error
This commit is contained in:
parent
b0ee2cfc6d
commit
c19b89ed5b
1 changed files with 6 additions and 1 deletions
|
@ -77,8 +77,13 @@ class ExperienceContextBuilder {
|
|||
public function with_current_brand_name(): ExperienceContextBuilder {
|
||||
$builder = clone $this;
|
||||
|
||||
$brand_name = $this->settings->has( 'brand_name' ) ? (string) $this->settings->get( 'brand_name' ) : '';
|
||||
if ( empty( $brand_name ) ) {
|
||||
$brand_name = null;
|
||||
}
|
||||
|
||||
$builder->experience_context = $builder->experience_context
|
||||
->with_brand_name( $this->settings->has( 'brand_name' ) ? (string) $this->settings->get( 'brand_name' ) : '' );
|
||||
->with_brand_name( $brand_name );
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue