• Resolved clickingclients

    (@clickingclients)


    I’d like to request a code update to check JSON has something to parse in a race condition on 1st load. Especially when JS loading optimizations are implemented.
    This adds the Try – Catch.
    If you can suggest a better improvement, it would be super.

    woocommerce-sendinblue.php line 1104

    
    function ws_ma_submit_event(submit_tracking_event_type, submit_tracking_event_data) {
                        if(submit_tracking_event_data !== undefined){
                            try{
                                sendinblue.track(submit_tracking_event_type, {}, JSON.parse(submit_tracking_event_data));
                            }
                            catch(error){
                                console.error("Not a JSON response")
                            }
                        }
                    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brevo

    (@neeraj_slit)

    Hi @clickingclients,

    Thank you for your message. So we can look into this for you please create a support ticket through your Sendinblue account or email us at [email protected]

    We look forward to hearing from you and assisting you with your request.

    Best regards,

    Plugin Support Dulé

    (@lephenixdelafamille)

    @clickingclients I will mark this as resolved. Feel free to write back if there is anything else we can help with.

    Best

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code update to avoid Race Condition on 1st load’ is closed to new replies.