Integrate Twilio for WooCommerce with WooFood 3
The below article is for WooFood , Food Ordering Plugin for WordPress and WooCommerce. If you don't already have it . Please take a look on the product page

Here is small code snippet to be able to use WooFood custom variables like Order Type (Delivery or Pickup), Date To Deliver and Time To Deliver .

function wpslash_woofood_twilio_woocommerce_custom_variables( $message, $order ) {

        if ( ! class_exists( 'SV_WC_Order_Compatibility' ) ) {
                return $message;
        }

        $woofood_order_type     = woofood_get_order_type_by_key(SV_WC_Order_Compatibility::get_meta( $order, 'woofood_order_type' ));
	$woofood_date_to_deliver = SV_WC_Order_Compatibility::get_meta( $order, 'woofood_date_to_deliver' );
	$woofood_time_to_deliver = SV_WC_Order_Compatibility::get_meta( $order, 'woofood_time_to_deliver' );


        $message = str_replace( '%order_type%', $woofood_order_type, $message );
        $message = str_replace( '%date_to_deliver%', $woofood_date_to_deliver, $message );
        $message = str_replace( '%time_to_deliver%', $woofood_time_to_deliver, $message );

    

        return $message;
}
add_filter( 'wc_twilio_sms_customer_sms_before_variable_replace', 'wpslash_woofood_twilio_woocommerce_custom_variables', 10, 2 );
The above article is for WooFood Food Delivery Plugin for WooCommerce