mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Fix the coding styles
This commit is contained in:
parent
6561475abe
commit
e94c495434
1 changed files with 11 additions and 7 deletions
|
@ -155,6 +155,10 @@ class Shipment implements ShipmentInterface {
|
|||
}
|
||||
|
||||
$product = $item->get_product();
|
||||
if ( ! is_a( $product, WC_Product::class ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$currency = $wc_order->get_currency();
|
||||
$quantity = (int) $item->get_quantity();
|
||||
$price_without_tax = (float) $wc_order->get_item_subtotal( $item, false );
|
||||
|
@ -165,10 +169,10 @@ class Shipment implements ShipmentInterface {
|
|||
mb_substr( $item->get_name(), 0, 127 ),
|
||||
new Money( $price_without_tax_rounded, $currency ),
|
||||
$quantity,
|
||||
$product instanceof WC_Product ? $this->prepare_description( $product->get_description() ) : '',
|
||||
$this->prepare_description( $product->get_description() ),
|
||||
null,
|
||||
$product instanceof WC_Product ? $product->get_sku() : '',
|
||||
( $product instanceof WC_Product && $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS,
|
||||
$product->get_sku(),
|
||||
$product->is_virtual() ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS,
|
||||
$product->get_permalink(),
|
||||
$image[0] ?? ''
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue