mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #1678 from woocommerce/PCP-1983-remove-item_url-from-API-request-when-product-has-no-image
Don't send `image_url` when it is empty (1983)
This commit is contained in:
commit
74241dd147
1 changed files with 4 additions and 1 deletions
|
@ -249,9 +249,12 @@ class Item {
|
|||
'sku' => $this->sku(),
|
||||
'category' => $this->category(),
|
||||
'url' => $this->url(),
|
||||
'image_url' => $this->image_url(),
|
||||
);
|
||||
|
||||
if ( $this->image_url() ) {
|
||||
$item['image_url'] = $this->image_url();
|
||||
}
|
||||
|
||||
if ( $this->tax() ) {
|
||||
$item['tax'] = $this->tax()->to_array();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue