This is the code we used in our functions file, I hope it helps others.
public function before_checkout_create_order( $order, $data ){
$method = “”;
foreach( $order->get_items( ‘shipping’ ) as $item_id => $item ){
$method = $shipping_method_id = $item->get_method_id();
}
if( $method == “local_pickup” ){
$order->update_meta_data( ‘_shipday_order_sync_prevent’, ‘yes’ );
}
}