WC_Meta_Box_Order_Actions::get_trash_or_delete_order_link()private staticWC 1.0

Forms a trash/delete order URL.

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

Хуков нет.

Возвращает

Строку.

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

$result = WC_Meta_Box_Order_Actions::get_trash_or_delete_order_link( $order_id ): string;
$order_id(int) (обязательный)
The order ID for which we want a trash/delete URL.

Код WC_Meta_Box_Order_Actions::get_trash_or_delete_order_link() WC 7.1.0

private static function get_trash_or_delete_order_link( int $order_id ): string {
	if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
		$order_list_url  = admin_url( 'admin.php?page=wc-orders' );
		$trash_order_url = add_query_arg(
			array(
				'action'           => 'trash',
				'order'            => array( $order_id ),
				'_wp_http_referer' => $order_list_url,
			),
			$order_list_url
		);

		return wp_nonce_url( $trash_order_url, 'bulk-orders' );
	}

	return get_delete_post_link( $order_id );
}