Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wc-ajax.php 2 locations

@@ 3129-3132 (lines=4) @@
3126
	 * Handle submissions from assets/js/wc-shipping-zone-methods.js Backbone model.
3127
	 */
3128
	public static function shipping_zone_add_method() {
3129
		if ( ! isset( $_POST['wc_shipping_zones_nonce'], $_POST['zone_id'], $_POST['method_id'] ) ) {
3130
			wp_send_json_error( 'missing_fields' );
3131
			exit;
3132
		}
3133
3134
		if ( ! wp_verify_nonce( $_POST['wc_shipping_zones_nonce'], 'wc_shipping_zones_nonce' ) ) {
3135
			wp_send_json_error( 'bad_nonce' );
@@ 3159-3162 (lines=4) @@
3156
	 * Handle submissions from assets/js/wc-shipping-zone-methods.js Backbone model.
3157
	 */
3158
	public static function shipping_zone_methods_save_changes() {
3159
		if ( ! isset( $_POST['wc_shipping_zones_nonce'], $_POST['zone_id'], $_POST['changes'] ) ) {
3160
			wp_send_json_error( 'missing_fields' );
3161
			exit;
3162
		}
3163
3164
		if ( ! wp_verify_nonce( $_POST['wc_shipping_zones_nonce'], 'wc_shipping_zones_nonce' ) ) {
3165
			wp_send_json_error( 'bad_nonce' );