Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order.php 2 locations

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