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";
}
else{
$checkout_url="https://yoursite.com/checkout/";
}
return $checkout_url;
}
Related Posts:
- Redirect no product url’s to static url
- Show only geolocated user country into Woocommerce checkout country fields
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- What is the action hook for an order that fails on frontend checkout in WooCommerce?
- Using a filter with multiple parameters and $this
- What Hook/Action is performed when a field in checkout form is changed in WooCommerce
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- Display custom product option in admin order details
- Woocommerce : Add name filed of checkout page to buyers wordpress display name
- How can i add product Accessories from front-end using custom php form?
- Add suffix to price html does not work
- With what hook do I remove WooCommerce existing Product Data Tab form fields?
- Add second price option based on payment method at cart item price
- How to check if is in cart page? [closed]
- Filter hook before create order WooCommerce
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to get rid of the hover zoom in WooCommerce single products
- How to change Woocommerce breadcrumbs content?
- Remember page before login page, redirect to that page after login
- Hook and send Woocommerce data after click Place Order button
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Extend Woocommerce rest api routes fails
- WooCommerce lost password reset flow not working with SendGrid (redirect loop)
- Remove action on product archive page [closed]
- Reverse engineering of WooCommerce Storefront filters
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- display available size on hover, in woocommerce shop page [closed]
- Customize WooCommerce orders displayed shipping
- Woocommerce Shipping module available only for type of products [closed]
- Woocommerce – Hide a Column in Cart Table
- Custom Redirect after registration in WooCommerce
- Rewriting Woocommerce Product Filters To URL Segments
- How To Change The Html of Products filtration sidebar in Woocommerce?
- woocommerce_get_price filter hook not working for product variation price
- Accessing parameters when adding filter
- Redirect user after login through woocommerce login page to page with his/her username?
- Get rid of product images mobile swipe functionality from WooCommerce single product [closed]
- Edit WooCommerce product content based on category
- woocommerce_package_rates not fired everytime
- Remove add to cart icon/view product button woocommerce
- Separeting product from post in search result
- WooCommerce order complete email logic
- How to override Woocommerce functionality in Reports section?
- how can use woocommerce add to cart popup?
- Woocommerce – Want to block a user agent from accessing specific product pages
- How to – proper WordPress 301 redirects?
- Add default user field to WooCommerce checkout [closed]
- How to Update the Order-Items While Editing an Order on the WooCommerce Admin Order Screen [closed]
- Woocommerce “added to cart” message on main(home) page
- Woocommerce: Complex query in pre_get_posts [closed]
- Remove an action by extending class and replacing it
- How to re-arrange this hooked content?
- (Woocommerce) Order by price when entering specific category
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to add order status class to the body tag?
- WooCommerce Registration redirect based on page ID
- password_reset doesnt work
- Filter default_content only for products
- How can I remove a WooCommerce Product Tab’s sub section in wp-admin?
- Conditional action hook
- How can I override wp_price woocommerce function in my theme
- Redirect to woocommerce checkout after adding to cart – item already in cart
- How to access page variable inside action hook
- Conditionally run function based on custom meta value?
- How to check if woocommerce_order_item_name is use in email?
- How to create a WooCommerce Product filter based on PHP foreach
- Use ID as slug for product category by default in WooCommerce?
- Variation prices breakdown only for single product page
- What is the problem with these lines of code?
- Two Filter Issue [closed]
- Missing variable options on add to cart form
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Rapyd’ does not have a method ‘install’
- Help to locate a woocommerce hook method
- check shipping amount in woocommerce_after_checkout_validation?
- Woocommerce Disabling Auto Restocking for Cancelled Orders
- Parameters in woocommerce_before_add_to_cart_button hook
- Is it ok to 301 redirect product-category pages to custom pages?
- How to change lost password email text using custom plugin wordpress?
- Overriding Plugin function in your child theme
- woocommerce_add_to_cart custom function called several times
- Update / refresh mini cart, after custom AJAX add_to_cart event
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- How to track product price changes?
- Filter orders in Admin area based on logged in user
- Display product thumbnail in Woocommerce email notifications
- wordpress site auto redirect to another site when I enable woocommerce
- WooCommerce Tax Filter Not Working
- woocommerce price filter not working when change currency
- Woocommerce: Unique price for individual basket items
- Hide add to cart when product variation has no price or is unavailable
- mydomain.com/wp-login redirects to wordpress.com/wp-login
- WooCommerce Admin Only Email Hook
- How to add custom checkout field in user details mail template
- WooCommerce comments_template Filter Not Firing
- Can a woocommerce hook alter the UI of a website?
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- AffiliateWP not calculating multiple quantities when using affwp_calc_referral_amount filter
- Hide a shipping method if cart total is higher than an amount
- Use a woocommerce hook to create a table and populate it with a query
- Reposition variation stock message