CanFinalize.php
3 years ago
HasCharge.php
3 years ago
HasCheckout.php
3 years ago
HasCoupon.php
3 years ago
HasCustomer.php
3 years ago
HasDiscount.php
3 years ago
HasImageSizes.php
3 years ago
HasOrder.php
3 years ago
HasPaymentIntent.php
3 years ago
HasPaymentMethod.php
3 years ago
HasPrice.php
3 years ago
HasProcessorType.php
3 years ago
HasProduct.php
3 years ago
HasPurchase.php
3 years ago
HasPurchases.php
3 years ago
HasRefund.php
3 years ago
HasShippingAddress.php
3 years ago
HasSubscription.php
3 years ago
HasSubscriptions.php
3 years ago
SyncsCustomer.php
3 years ago
HasShippingAddress.php
17 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Models\Traits; |
| 4 | |
| 5 | trait HasShippingAddress { |
| 6 | /** |
| 7 | * Always set discount as object. |
| 8 | * |
| 9 | * @param array|object $value Value to set. |
| 10 | * @return $this |
| 11 | */ |
| 12 | protected function setShippingAddressAttribute( $value ) { |
| 13 | $this->attributes['shipping_address'] = (object) $value; |
| 14 | return $this; |
| 15 | } |
| 16 | } |
| 17 |