Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order.php 2 locations

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