|
@@ 2236-2238 (lines=3) @@
|
| 2233 |
|
check_ajax_referer( 'load-variations', 'security' ); |
| 2234 |
|
|
| 2235 |
|
// Check permissions again and make sure we have what we need |
| 2236 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) { |
| 2237 |
|
die( -1 ); |
| 2238 |
|
} |
| 2239 |
|
|
| 2240 |
|
global $post; |
| 2241 |
|
|
|
@@ 2391-2393 (lines=3) @@
|
| 2388 |
|
check_ajax_referer( 'save-variations', 'security' ); |
| 2389 |
|
|
| 2390 |
|
// Check permissions again and make sure we have what we need |
| 2391 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
| 2392 |
|
die( -1 ); |
| 2393 |
|
} |
| 2394 |
|
|
| 2395 |
|
// Remove previous meta box errors |
| 2396 |
|
WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2764-2766 (lines=3) @@
|
| 2761 |
|
check_ajax_referer( 'bulk-edit-variations', 'security' ); |
| 2762 |
|
|
| 2763 |
|
// Check permissions again and make sure we have what we need |
| 2764 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
| 2765 |
|
die( -1 ); |
| 2766 |
|
} |
| 2767 |
|
|
| 2768 |
|
$product_id = absint( $_POST['product_id'] ); |
| 2769 |
|
$bulk_action = wc_clean( $_POST['bulk_action'] ); |