Woocommerce defualt redirection changes user-agent

Currently I am writing 2 theme for wordpress and woocommerce. One is for the mobile only and another one is for PC. It works fine for normal links and the request can be defined by using wp_is_mobile() function to find out which theme to use.
The problem is that when the woocommerce try to check out with empty cart, it will automatically redirect to cart. The wp_is_mobile() function will not get the right theme since the user-Agent will change from Mozilla/5.0 (iPhone.. to Mozilla/5.0 (Windows ..
Do someone knows how to keep the redirection user-agent same from orignal request?

Read more here: Woocommerce defualt redirection changes user-agent

Leave a Reply

Your email address will not be published. Required fields are marked *