Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2437-2439 (lines=3) @@
2434
		check_ajax_referer( 'load-variations', 'security' );
2435
2436
		// Check permissions again and make sure we have what we need
2437
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2438
			die( -1 );
2439
		}
2440
2441
		global $post;
2442
@@ 2592-2594 (lines=3) @@
2589
		check_ajax_referer( 'save-variations', 'security' );
2590
2591
		// Check permissions again and make sure we have what we need
2592
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2593
			die( -1 );
2594
		}
2595
2596
		// Remove previous meta box errors
2597
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2965-2967 (lines=3) @@
2962
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2963
2964
		// Check permissions again and make sure we have what we need
2965
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2966
			die( -1 );
2967
		}
2968
2969
		$product_id  = absint( $_POST['product_id'] );
2970
		$bulk_action = wc_clean( $_POST['bulk_action'] );