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.
Parameter | Type | Description |
---|---|---|
$items | array | Must 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 |
$order | WC_Order | The WooCommerce order instance or null |
Changelog
Version | Description |
---|---|
3.0.0 | Introduced |
Usage Example
add_filter('sequra_cart_service_get_items', function($items, $order){
$items = ... // Modify the content of the array
return $items;
},10, 2);
Updated about 1 month ago