• 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)
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.