HEX
Server: LiteSpeed
System: Linux pulsar191.sitesanctuary.org 5.14.0-284.30.1.el9.tuxcare.els9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jan 10 17:34:05 UTC 2025 x86_64
User: lgooir (1604)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/lgooir/public_html/wp-content/plugins/woodmart-plus/assets/admin/js/order-notif.js
(function($){

    $('.postbox').on('change','select[name="order_status"]',function(e){
        
        var $this = $(this);

        if( $this.hasClass('ajax_start') )
        {
            return;
        }

        var $loder =  '<div class="lds-dual-ring laos"></div>';

        var $parrent = $this.closest('.wc-order-status');
        var $order_id = $('body').find('#post_ID').val();
        var $current_status = $('body').find('#original_order_status').val();

        $parrent.append( $loder );
        // var $section_send_customer = $('body').find('.send_message_order_customer');

        if( $parrent.find('.sms_generate_order_status').length )
        {
            $parrent.find('.sms_generate_order_status').remove();
            $parrent.find('label[for="sms_resend"]').remove();
        }

        $.ajax({
            dataType:'json',type:'POST',url :ajaxurl,
            data:{
                action:'generate_text_order_sms',
                order_id : $order_id,
                current_status : $current_status,
                change_status : $this.val(),
            },
            beforeSend : function(params) {
                $this.addClass('ajax_start');
                if( $parrent.find('.sms_generate_order_status').length )
                {
                    $parrent.find('.sms_generate_order_status').remove();
                    $parrent.find('label[for="sms_resend"]').remove();
                }
            },
            success:function(response)
            {
                $this.removeClass('ajax_start');
                $parrent.find( '.laos' ).remove();
                $parrent.append('<textarea rows="5" class="sms_generate_order_status" name="new_message_order_sms">'+response.msg+'</textarea>');
                $parrent.append('<label for="sms_resend"> ارسال مجدد انجام شود؟ <input style="width:5%" id="sms_resend" type="checkbox" name="re_send_sms_order" > </label>')// $section_send_customer.append( '<textarea rows="5" class="sms_generate_order_status" name="new_message_order_sms">'+response.msg+'</textarea>' );
                // $section_send_customer.append('<label for="sms_resend"> ارسال مجدد انجام شود؟ <input style="width:5%" id="sms_resend" type="checkbox" name="re_send_sms_order" > </label>')
                // if( $section_send_customer.find('.sms_generate_order_status').length )
                // {
                //     $section_send_customer.find('.sms_generate_order_status').append('خیلی عالی');
                // }
                // $(document).trigger('re_init_sms_notification');
            },
            error: function(error)
            {

            }
        });
    });

})( jQuery );