|
@@ 2423-2425 (lines=3) @@
|
| 2420 |
|
check_ajax_referer( 'load-variations', 'security' ); |
| 2421 |
|
|
| 2422 |
|
// Check permissions again and make sure we have what we need |
| 2423 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) { |
| 2424 |
|
die( -1 ); |
| 2425 |
|
} |
| 2426 |
|
|
| 2427 |
|
global $post; |
| 2428 |
|
|
|
@@ 2578-2580 (lines=3) @@
|
| 2575 |
|
check_ajax_referer( 'save-variations', 'security' ); |
| 2576 |
|
|
| 2577 |
|
// Check permissions again and make sure we have what we need |
| 2578 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) { |
| 2579 |
|
die( -1 ); |
| 2580 |
|
} |
| 2581 |
|
|
| 2582 |
|
// Remove previous meta box errors |
| 2583 |
|
WC_Admin_Meta_Boxes::$meta_box_errors = array(); |
|
@@ 2951-2953 (lines=3) @@
|
| 2948 |
|
check_ajax_referer( 'bulk-edit-variations', 'security' ); |
| 2949 |
|
|
| 2950 |
|
// Check permissions again and make sure we have what we need |
| 2951 |
|
if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) { |
| 2952 |
|
die( -1 ); |
| 2953 |
|
} |
| 2954 |
|
|
| 2955 |
|
$product_id = absint( $_POST['product_id'] ); |
| 2956 |
|
$bulk_action = wc_clean( $_POST['bulk_action'] ); |