Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/give/includes/admin/emails/ |
Upload File : |
<?php
/**
* This file contain code to handle email notification setting ajax.
*
* Register settings Include and setup custom metaboxes and fields.
*
* @package Give
* @subpackage Classes/Emails
* @license https://opensource.org/licenses/gpl-license GNU Public License
* @link https://github.com/webdevstudios/Custom-Metaboxes-and-Fields-for-WordPress
*/
/**
* Enabled & disable notification
*
* @since 2.0
*/
function give_set_notification_status_handler() {
// Is user have permission to edit give setting.
if ( ! current_user_can( 'manage_give_settings' ) ) {
return;
}
$notification_id = isset( $_POST['notification_id'] ) ? give_clean( $_POST['notification_id'] ) : '';
if ( ! empty( $notification_id ) && give_update_option( "{$notification_id}_notification", give_clean( $_POST['status'] ) ) ) {
wp_send_json_success();
}
wp_send_json_error();
}
add_action( 'wp_ajax_give_set_notification_status', 'give_set_notification_status_handler' );