|
@@ 2163-2174 (lines=12) @@
|
| 2160 |
|
* |
| 2161 |
|
* @return string |
| 2162 |
|
*/ |
| 2163 |
|
public function get_cancel_order_url( $redirect = '' ) { |
| 2164 |
|
|
| 2165 |
|
// Get cancel endpoint |
| 2166 |
|
$cancel_endpoint = $this->get_cancel_endpoint(); |
| 2167 |
|
|
| 2168 |
|
return apply_filters( 'woocommerce_get_cancel_order_url', esc_url( add_query_arg( array( |
| 2169 |
|
'cancel_order' => 'true', |
| 2170 |
|
'order' => $this->order_key, |
| 2171 |
|
'order_id' => $this->id, |
| 2172 |
|
'redirect' => $redirect, |
| 2173 |
|
), $cancel_endpoint ) ) ); |
| 2174 |
|
} |
| 2175 |
|
|
| 2176 |
|
/** |
| 2177 |
|
* Generates a raw (unescaped) cancel-order URL for use by payment gateways. |
|
@@ 2182-2193 (lines=12) @@
|
| 2179 |
|
* @param string $redirect |
| 2180 |
|
* @return string The unescaped cancel-order URL. |
| 2181 |
|
*/ |
| 2182 |
|
public function get_cancel_order_url_raw( $redirect = '' ) { |
| 2183 |
|
|
| 2184 |
|
// Get cancel endpoint |
| 2185 |
|
$cancel_endpoint = $this->get_cancel_endpoint(); |
| 2186 |
|
|
| 2187 |
|
return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array( |
| 2188 |
|
'cancel_order' => 'true', |
| 2189 |
|
'order' => $this->order_key, |
| 2190 |
|
'order_id' => $this->id, |
| 2191 |
|
'redirect' => $redirect, |
| 2192 |
|
), $cancel_endpoint ) ); |
| 2193 |
|
} |
| 2194 |
|
|
| 2195 |
|
|
| 2196 |
|
/** |