mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Don't send image_url
when it is empty
This commit is contained in:
parent
b4f8478920
commit
fa45071a5f
1 changed files with 4 additions and 1 deletions
|
@ -249,9 +249,12 @@ class Item {
|
||||||
'sku' => $this->sku(),
|
'sku' => $this->sku(),
|
||||||
'category' => $this->category(),
|
'category' => $this->category(),
|
||||||
'url' => $this->url(),
|
'url' => $this->url(),
|
||||||
'image_url' => $this->image_url(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( $this->image_url() ) {
|
||||||
|
$item['image_url'] = $this->image_url();
|
||||||
|
}
|
||||||
|
|
||||||
if ( $this->tax() ) {
|
if ( $this->tax() ) {
|
||||||
$item['tax'] = $this->tax()->to_array();
|
$item['tax'] = $this->tax()->to_array();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue