woocommerce_order_actions хук-фильтрWC 2.1.0

Filter: woocommerce_order_actions Allows filtering of the available order actions for an order.

Использование

add_filter( 'woocommerce_order_actions', 'wp_kama_woocommerce_order_actions_filter', 10, 2 );

/**
 * Function for `woocommerce_order_actions` filter-hook.
 * 
 * @param array         $actions The available order actions for the order.
 * @param WC_Order|null $order   The order object or null if no order is available.
 *
 * @return array
 */
function wp_kama_woocommerce_order_actions_filter( $actions, $order ){

	// filter...
	return $actions;
}
$actions(массив)
The available order actions for the order.
$order(WC_Order|null)
The order object or null if no order is available.

Список изменений

С версии 2.1.0 Введена.
С версии 2.1.0 Filter was added.
С версии 5.8.0 The $order param was added.

Где вызывается хук

WC_Meta_Box_Order_Actions::get_available_order_actions_for_order()
woocommerce_order_actions
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php 190
return apply_filters( 'woocommerce_order_actions', $actions, $order );

Где используется хук в WooCommerce

Использование не найдено.