woocommerce_sequra_add_service_end_date
Hook
Filter
Filter the service end date.
Description
This filter allows modifying the service end date value for a given product. It is only triggered for products that are services and when the merchant configuration allows selling services.
Parameter | Type | Description |
---|---|---|
$end_date | string | Service end date using ISO 8601 to represent fixed time or duration |
$product | WC_Product | The WooCommerce product instance |
$item | array or WC_Order_Item_Product | An array representing the WooCommerce Cart Item or an instance of Order Item |
Changelog
Version | Description |
---|---|
2.0.0 | Introduced |
Usage Example
add_filter('sequra_create_order_request_gui_options', function($end_date, $product, $item){
$end_date = 'P2Y'; // Set your custom value
return $end_date;
},10, 3);
Updated about 1 month ago