Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order.php 2 locations

@@ 1080-1087 (lines=8) @@
1077
	 *
1078
	 * @return string
1079
	 */
1080
	public function get_cancel_order_url( $redirect = '' ) {
1081
		return apply_filters( 'woocommerce_get_cancel_order_url', wp_nonce_url( add_query_arg( array(
1082
			'cancel_order' => 'true',
1083
			'order'        => $this->get_order_key(),
1084
			'order_id'     => $this->get_id(),
1085
			'redirect'     => $redirect
1086
		), $this->get_cancel_endpoint() ), 'woocommerce-cancel_order' ) );
1087
	}
1088
1089
	/**
1090
	 * Generates a raw (unescaped) cancel-order URL for use by payment gateways.
@@ 1096-1104 (lines=9) @@
1093
	 *
1094
	 * @return string The unescaped cancel-order URL.
1095
	 */
1096
	public function get_cancel_order_url_raw( $redirect = '' ) {
1097
		return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array(
1098
			'cancel_order' => 'true',
1099
			'order'        => $this->get_order_key(),
1100
			'order_id'     => $this->get_id(),
1101
			'redirect'     => $redirect,
1102
			'_wpnonce'     => wp_create_nonce( 'woocommerce-cancel_order' )
1103
		), $this->get_cancel_endpoint() ) );
1104
	}
1105
1106
	/**
1107
	 * Helper method to return the cancel endpoint.