Advertisement
nshelper

Untitled

May 3rd, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. $price = (float) $item['line_subtotal'] / (float) $item['quantity'];
  2.  
  3. //$description = $this->prepare_description( $product->get_description() );
  4. $description = '';
  5.  
  6. $data = new Item(
  7. mb_substr( $product->get_name(), 0, 127 ),
  8. new Money( $price, $this->currency ),
  9. $quantity,
  10. $description,
  11. null,
  12. $this->prepare_sku( $product->get_sku() ),
  13. ( $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS,
  14. $product->get_permalink(),
  15. $image[0] ?? '',
  16. 0,
  17. $cart_item_key
  18. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement