$action_data ) { if ( $action_data['action'] == "pro_woocommerce_update_page_option" ) { $is_admin = current_user_can( 'manage_options' ); $is_shop_manager = current_user_can( 'manage_woocommerce' ); $is_allowed = $is_admin || $is_shop_manager; if ( ! $is_allowed ) { exit; } } } } add_action('wp_ajax_elementor_ajax', 'patch_update_option');