|
@@ 1303-1310 (lines=8) @@
|
| 1300 |
|
* |
| 1301 |
|
* @return string |
| 1302 |
|
*/ |
| 1303 |
|
public function get_cancel_order_url( $redirect = '' ) { |
| 1304 |
|
return apply_filters( 'woocommerce_get_cancel_order_url', wp_nonce_url( add_query_arg( array( |
| 1305 |
|
'cancel_order' => 'true', |
| 1306 |
|
'order' => $this->get_order_key(), |
| 1307 |
|
'order_id' => $this->get_id(), |
| 1308 |
|
'redirect' => $redirect |
| 1309 |
|
), $this->get_cancel_endpoint() ), 'woocommerce-cancel_order' ) ); |
| 1310 |
|
} |
| 1311 |
|
|
| 1312 |
|
/** |
| 1313 |
|
* Generates a raw (unescaped) cancel-order URL for use by payment gateways. |
|
@@ 1319-1327 (lines=9) @@
|
| 1316 |
|
* |
| 1317 |
|
* @return string The unescaped cancel-order URL. |
| 1318 |
|
*/ |
| 1319 |
|
public function get_cancel_order_url_raw( $redirect = '' ) { |
| 1320 |
|
return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array( |
| 1321 |
|
'cancel_order' => 'true', |
| 1322 |
|
'order' => $this->get_order_key(), |
| 1323 |
|
'order_id' => $this->get_id(), |
| 1324 |
|
'redirect' => $redirect, |
| 1325 |
|
'_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ) |
| 1326 |
|
), $this->get_cancel_endpoint() ) ); |
| 1327 |
|
} |
| 1328 |
|
|
| 1329 |
|
/** |
| 1330 |
|
* Helper method to return the cancel endpoint. |