@@ 1901-1903 (lines=3) @@ | ||
1898 | check_ajax_referer( 'save-variations', 'security' ); |
|
1899 | ||
1900 | // Check permissions again and make sure we have what we need |
|
1901 | if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
|
1902 | wp_die( -1 ); |
|
1903 | } |
|
1904 | ||
1905 | $product_id = absint( $_POST['product_id'] ); |
|
1906 | WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2318-2320 (lines=3) @@ | ||
2315 | check_ajax_referer( 'bulk-edit-variations', 'security' ); |
|
2316 | ||
2317 | // Check permissions again and make sure we have what we need |
|
2318 | if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
|
2319 | wp_die( -1 ); |
|
2320 | } |
|
2321 | ||
2322 | $product_id = absint( $_POST['product_id'] ); |
|
2323 | $bulk_action = wc_clean( $_POST['bulk_action'] ); |