Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order.php 2 locations

@@ 1233-1240 (lines=8) @@
1230
	 *
1231
	 * @return string
1232
	 */
1233
	public function get_cancel_order_url( $redirect = '' ) {
1234
		return apply_filters( 'woocommerce_get_cancel_order_url', wp_nonce_url( add_query_arg( array(
1235
			'cancel_order' => 'true',
1236
			'order'        => $this->get_order_key(),
1237
			'order_id'     => $this->get_id(),
1238
			'redirect'     => $redirect
1239
		), $this->get_cancel_endpoint() ), 'woocommerce-cancel_order' ) );
1240
	}
1241
1242
	/**
1243
	 * Generates a raw (unescaped) cancel-order URL for use by payment gateways.
@@ 1249-1257 (lines=9) @@
1246
	 *
1247
	 * @return string The unescaped cancel-order URL.
1248
	 */
1249
	public function get_cancel_order_url_raw( $redirect = '' ) {
1250
		return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array(
1251
			'cancel_order' => 'true',
1252
			'order'        => $this->get_order_key(),
1253
			'order_id'     => $this->get_id(),
1254
			'redirect'     => $redirect,
1255
			'_wpnonce'     => wp_create_nonce( 'woocommerce-cancel_order' )
1256
		), $this->get_cancel_endpoint() ) );
1257
	}
1258
1259
	/**
1260
	 * Helper method to return the cancel endpoint.