| @@ 156-158 (lines=3) @@ | ||
| 153 | * Bulk actions. |
|
| 154 | */ |
|
| 155 | private function bulk_actions() { |
|
| 156 | if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) { |
|
| 157 | wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) ); |
|
| 158 | } |
|
| 159 | ||
| 160 | $keys = array_map( 'absint', (array) $_GET['key'] ); |
|
| 161 | ||
| @@ 127-129 (lines=3) @@ | ||
| 124 | * Save method. |
|
| 125 | */ |
|
| 126 | private function save() { |
|
| 127 | if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) { |
|
| 128 | wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) ); |
|
| 129 | } |
|
| 130 | ||
| 131 | $webhook_id = absint( $_POST['webhook_id'] ); |
|
| 132 | ||
| @@ 261-263 (lines=3) @@ | ||
| 258 | * Bulk actions. |
|
| 259 | */ |
|
| 260 | private function bulk_actions() { |
|
| 261 | if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) { |
|
| 262 | wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) ); |
|
| 263 | } |
|
| 264 | ||
| 265 | if ( ! current_user_can( 'edit_shop_webhooks' ) ) { |
|
| 266 | wp_die( __( 'You don\'t have permissions to edit Webhooks!', 'woocommerce' ) ); |
|
| @@ 74-76 (lines=3) @@ | ||
| 71 | public static function save() { |
|
| 72 | global $current_tab; |
|
| 73 | ||
| 74 | if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) { |
|
| 75 | die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) ); |
|
| 76 | } |
|
| 77 | ||
| 78 | // Trigger actions |
|
| 79 | do_action( 'woocommerce_settings_save_' . $current_tab ); |
|