WC_Meta_Box_Order_Actions::get_available_order_actions_for_order()private staticWC 5.8.0

Get the available order actions for a given order.

{} Это метод класса: WC_Meta_Box_Order_Actions{}

Хуки из метода

Возвращает

Массив.

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

$result = WC_Meta_Box_Order_Actions::get_available_order_actions_for_order( $order );
$order(WC_Order|null) (обязательный)
The order object or null if no order is available.

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

С версии 5.8.0 Введена.

Код WC_Meta_Box_Order_Actions::get_available_order_actions_for_order() WC 6.4.1

private static function get_available_order_actions_for_order( $order ) {
	$actions = array(
		'send_order_details'              => __( 'Email invoice / order details to customer', 'woocommerce' ),
		'send_order_details_admin'        => __( 'Resend new order notification', 'woocommerce' ),
		'regenerate_download_permissions' => __( 'Regenerate download permissions', 'woocommerce' ),
	);

	/**
	 * Filter: woocommerce_order_actions
	 * Allows filtering of the available order actions for an order.
	 *
	 * @since 2.1.0 Filter was added.
	 * @since 5.8.0 The $order param was added.
	 *
	 * @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 apply_filters( 'woocommerce_order_actions', $actions, $order );
}