woocommerce_fulfillment_calculate_order_fulfillment_status filter-hookWC 10.1.0

This filter allows plugins to modify the fulfillment status of an order.

Usage

add_filter( 'woocommerce_fulfillment_calculate_order_fulfillment_status', 'wp_kama_woocommerce_fulfillment_calculate_order_status_filter', 10, 3 );

/**
 * Function for `woocommerce_fulfillment_calculate_order_fulfillment_status` filter-hook.
 * 
 * @param string   $status       The default fulfillment status.
 * @param WC_Order $order        The order object.
 * @param array    $fulfillments An array of fulfillments for the order.
 *
 * @return string
 */
function wp_kama_woocommerce_fulfillment_calculate_order_status_filter( $status, $order, $fulfillments ){

	// filter...
	return $status;
}
$status(string)
The default fulfillment status.
$order(WC_Order)
The order object.
$fulfillments(array)
An array of fulfillments for the order.

Changelog

Since 10.1.0 Introduced.

Where the hook is called

FulfillmentUtils::calculate_order_fulfillment_status()
woocommerce_fulfillment_calculate_order_fulfillment_status
woocommerce/src/Internal/Fulfillments/FulfillmentUtils.php 173-178
return apply_filters(
	'woocommerce_fulfillment_calculate_order_fulfillment_status',
	$status,
	$order,
	$fulfillments
);

Where the hook is used in WooCommerce

Usage not found.