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.

ParameterTypeDescription
$cartSeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\CartCart instance

Changelog

VersionDescription
3.0.0Introduced

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.
  );
});