sequra_cart_service_get_items

Hook Filter

Filter cart items.

Description

This filter allows modifying the cart items that are used to create the payload for calling the Order, OrderUpdate and DeliveryReport APIs.

ParameterTypeDescription
$itemsarrayMust contain only instances of SeQura\WC\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Item\Registration_Item, SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Item\ServiceItem or SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Item\ProductItem
$orderWC_OrderThe WooCommerce order instance or null

Changelog

VersionDescription
3.0.0Introduced

Usage Example

add_filter('sequra_cart_service_get_items', function($items, $order){
  $items = ... // Modify the content of the array
  return $items;
},10, 2);