|
@@ 2056-2067 (lines=12) @@
|
| 2053 |
|
* |
| 2054 |
|
* @return string |
| 2055 |
|
*/ |
| 2056 |
|
public function get_cancel_order_url( $redirect = '' ) { |
| 2057 |
|
|
| 2058 |
|
// Get cancel endpoint |
| 2059 |
|
$cancel_endpoint = $this->get_cancel_endpoint(); |
| 2060 |
|
|
| 2061 |
|
return apply_filters( 'woocommerce_get_cancel_order_url', wp_nonce_url( add_query_arg( array( |
| 2062 |
|
'cancel_order' => 'true', |
| 2063 |
|
'order' => $this->order_key, |
| 2064 |
|
'order_id' => $this->id, |
| 2065 |
|
'redirect' => $redirect |
| 2066 |
|
), $cancel_endpoint ), 'woocommerce-cancel_order' ) ); |
| 2067 |
|
} |
| 2068 |
|
|
| 2069 |
|
/** |
| 2070 |
|
* Generates a raw (unescaped) cancel-order URL for use by payment gateways. |
|
@@ 2076-2088 (lines=13) @@
|
| 2073 |
|
* |
| 2074 |
|
* @return string The unescaped cancel-order URL. |
| 2075 |
|
*/ |
| 2076 |
|
public function get_cancel_order_url_raw( $redirect = '' ) { |
| 2077 |
|
|
| 2078 |
|
// Get cancel endpoint |
| 2079 |
|
$cancel_endpoint = $this->get_cancel_endpoint(); |
| 2080 |
|
|
| 2081 |
|
return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array( |
| 2082 |
|
'cancel_order' => 'true', |
| 2083 |
|
'order' => $this->order_key, |
| 2084 |
|
'order_id' => $this->id, |
| 2085 |
|
'redirect' => $redirect, |
| 2086 |
|
'_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ) |
| 2087 |
|
), $cancel_endpoint ) ); |
| 2088 |
|
} |
| 2089 |
|
|
| 2090 |
|
|
| 2091 |
|
/** |