@@ 1138-1145 (lines=8) @@ | ||
1135 | * |
|
1136 | * @return string |
|
1137 | */ |
|
1138 | public function get_cancel_order_url( $redirect = '' ) { |
|
1139 | return apply_filters( 'woocommerce_get_cancel_order_url', wp_nonce_url( add_query_arg( array( |
|
1140 | 'cancel_order' => 'true', |
|
1141 | 'order' => $this->get_order_key(), |
|
1142 | 'order_id' => $this->get_id(), |
|
1143 | 'redirect' => $redirect |
|
1144 | ), $this->get_cancel_endpoint() ), 'woocommerce-cancel_order' ) ); |
|
1145 | } |
|
1146 | ||
1147 | /** |
|
1148 | * Generates a raw (unescaped) cancel-order URL for use by payment gateways. |
|
@@ 1154-1162 (lines=9) @@ | ||
1151 | * |
|
1152 | * @return string The unescaped cancel-order URL. |
|
1153 | */ |
|
1154 | public function get_cancel_order_url_raw( $redirect = '' ) { |
|
1155 | return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array( |
|
1156 | 'cancel_order' => 'true', |
|
1157 | 'order' => $this->get_order_key(), |
|
1158 | 'order_id' => $this->get_id(), |
|
1159 | 'redirect' => $redirect, |
|
1160 | '_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ) |
|
1161 | ), $this->get_cancel_endpoint() ) ); |
|
1162 | } |
|
1163 | ||
1164 | /** |
|
1165 | * Helper method to return the cancel endpoint. |