Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order.php 2 locations

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