WC_Order::get_cancel_order_url_raw
Generates a raw (unescaped) cancel-order URL for use by payment gateways.
Метод класса: WC_Order{}
Хуки из метода
Возвращает
Строку. The unescaped cancel-order URL.
Использование
$WC_Order = new WC_Order(); $WC_Order->get_cancel_order_url_raw( $redirect );
- $redirect(строка)
- Redirect URL.
По умолчанию:''
Код WC_Order::get_cancel_order_url_raw() WC Order::get cancel order url raw WC 10.7.0
public function get_cancel_order_url_raw( $redirect = '' ) {
/**
* Filter the raw URL to cancel the order in the frontend.
*
* @since 2.2.0
*
* @param string $url
* @param WC_Order $order Order data.
* @param string $redirect Redirect URL.
*/
return apply_filters(
'woocommerce_get_cancel_order_url_raw',
add_query_arg(
array(
'cancel_order' => 'true',
'order' => $this->get_order_key(),
'order_id' => $this->get_id(),
'redirect' => $redirect,
'_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ),
),
$this->get_cancel_endpoint()
),
$this,
$redirect
);
}