sequra_create_order_request_cart_options
Hook Filter
Filter the cart.
Description
This filter allows modifying the cart to be used to build the merchant reference payload attribute for the Order, OrderUpdate and DeliveryReport API calls.
| Parameter | Type | Description |
|---|---|---|
$cart | SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Cart | Cart instance |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced |
Usage Example
add_filter('sequra_create_order_request_cart_options', function($cart){
return new \SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Cart(
$cart->getCurrency(), // Your custom value here.
$cart->isGift(), // Your custom value here.
$cart->getItems(), // Your custom value here.
$cart->getCartRef(), // Your custom value here.
$cart->getCreatedAt(), // Your custom value here.
$cart->getUpdatedAt(), // Your custom value here.
);
});Updated 6 months ago