/**
 * Admin notice script.
 */
jQuery(document).ready(function ($) {
    $(document).on('click', '#opl-admin-notice .notice-dismiss', function () {
        var $notice = $('#opl-admin-notice');
        $notice.hide();

        $.ajax({
            url: oplAdminNotice.ajax_url,
            type: 'POST',
            data: {
                action: 'opl_admin_notice_status',
                nonce: oplAdminNotice.nonce
            },
            error: function () {
                console.log('Something went wrong. Please try again.');
            }
        });
    });
});

