Enviro Weather GSM

Good day, I have an Enviro Weather that is working perfectly via wifi but due to the nature of the install I need to use cellular/gsm instead. I am trying to figure out how to circumvent the wifi and send the log data via UART0 on the Pico. I have a GSM unit that will initiate the connection on wake up input from the Pico and I have figure all the other code/commands to issue but not sure where I need to place/save them and not have the system “halt” on no wifi