|
@@ 2379-2381 (lines=3) @@
|
| 2376 |
|
check_ajax_referer( 'load-variations', 'security' ); |
| 2377 |
|
|
| 2378 |
|
// Check permissions again and make sure we have what we need |
| 2379 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) { |
| 2380 |
|
die( -1 ); |
| 2381 |
|
} |
| 2382 |
|
|
| 2383 |
|
global $post; |
| 2384 |
|
|
|
@@ 2534-2536 (lines=3) @@
|
| 2531 |
|
check_ajax_referer( 'save-variations', 'security' ); |
| 2532 |
|
|
| 2533 |
|
// Check permissions again and make sure we have what we need |
| 2534 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
| 2535 |
|
die( -1 ); |
| 2536 |
|
} |
| 2537 |
|
|
| 2538 |
|
// Remove previous meta box errors |
| 2539 |
|
WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2947-2949 (lines=3) @@
|
| 2944 |
|
check_ajax_referer( 'bulk-edit-variations', 'security' ); |
| 2945 |
|
|
| 2946 |
|
// Check permissions again and make sure we have what we need |
| 2947 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
| 2948 |
|
die( -1 ); |
| 2949 |
|
} |
| 2950 |
|
|
| 2951 |
|
$product_id = absint( $_POST['product_id'] ); |
| 2952 |
|
$bulk_action = wc_clean( $_POST['bulk_action'] ); |