I use "Digits (WordPress Mobile Number Signup and Login)" for signup by email & SMS ; when non logged in user proceed to checkout , want to redirect to signup form of Digits (not usual woocommerce signup).

In case already logged-in users, they should go following the next step in the checkout process as normal.

appreciate if anybody help.

  • in woocommerce -> settings -> Accounts & Privacy, you can unckeck "Allow customers to place orders without an account " – Kaperto Dec 9 '19 at 11:28
  • thanks; I have already done but only one message is displayed (login is required) ; so need auto redirect to login page url or shortcode. if add link of login page there, it shows below the checkout page for logged in user too. – kookool Dec 12 '19 at 11:38

I find and use below code for when user in cart page and cart not empty:

add_filter('woocommerce_get_checkout_url', 'dj_redirect_checkout');
function dj_redirect_checkout($url) {
     global $woocommerce;
     if(is_cart() && !is_user_logged_in() ){
          $checkout_url = 'digits login url';
     return  $checkout_url; 
  • It's worked. thanks – kookool Dec 29 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.