Ways to skip directly to the shopping cart page in WooCommerce

WooCommerce is a free and open-source e-commerce plugin for WordPress websites, and many people use it to build their own online malls. However, some users want to make the checkout process a little smoother as a way to improve the user experience of their website. Skipping the shopping cart page in WooCommerce not only makes the user experience better, but also improves the sales conversion rate and speeds up the checkout process. So how do we do skip cart page?

图片[1]-在WooCommerce中直接跳过购物车页面的方法-光子波动网 | WordPress教程、Elementor教程与故障修复

I. WooCommerce Default Settings Skip Cart Page

1. Open WooCommerce Settings > Products, and under the "Add to Cart Behavior" section, check the "Redirect to cart page after successful add" option.

图片[2]-在WooCommerce中直接跳过购物车页面的方法-光子波动网 | WordPress教程、Elementor教程与故障修复

2. Set and select the shopping cart page as the checkout page in "Advanced".

图片[3]-在WooCommerce中直接跳过购物车页面的方法-光子波动网 | WordPress教程、Elementor教程与故障修复

Second, use the plugin to skip the shopping cart page in WooCommerce

1, open the WordPress website background, download the "Direct checkout for WooCommerce" plugin and click to enable;

图片[4]-在WooCommerce中直接跳过购物车页面的方法-光子波动网 | WordPress教程、Elementor教程与故障修复

2. ToWooCommerceSettings > Products and uncheck the Add to Cart Behavior section;

图片[5]-在WooCommerce中直接跳过购物车页面的方法-光子波动网 | WordPress教程、Elementor教程与故障修复

3. Save the changes and go to the "Direct Checkout" tab, then select "Yes" from the "Add to Cart Redirection" option, a new option will appear A new option will appear "Added to cart redirection to", from there select "Checkout" page.

4. After saving your changes, click the button on any product in the Add to Cart store. It should be redirected to the checkout page, not the shopping cart page.

Third, skip the shopping cart page in WooCommerce by code

1, open the WordPress dashboard, click WooCommerce > Settings, click "Products" > "General", in the "Add to cart behavior" section. section, uncheck both options.

2, next, open the theme folder and find the functions.php file; add the following code snippet to the end of the functions.php file.

add_filter('add_to_cart_redirect', 'cw_redirect_add_to_cart');
function cw_redirect_add_to_cart() {
   global $woocommerce.
   $cw_redirect_url_checkout = $woocommerce->cart->get_checkout_url(); return $cw_redirect_url_checkout; function cw_redirect_add_to_cart()
   return $cw_redirect_url_checkout;
}

3. After adding the code, clicking on the action will redirect to the checkout page. As a result of button labeling in WooCommerce, the product should be added from "Add to Cart" to the recipient "Buy for Me". To do this, add the following filter to the functions.php file.

add_filter( 'woocommerce_product_single_add_to_cart_text', 'cw_btntext_cart' );

add_filter( 'woocommerce_product_add_to_cart_text', 'cw_btntext_cart' );




function cw_btntext_cart() {

   return __( 'Buy Me', 'woocommerce' );

}

Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
客服微信
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: [email protected]
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Harry
THE END
If you like it, support it.
kudos0 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments