Nhiều trường hợp bạn muốn tối giản quy trình mua hàng trên website WordPress sử dụng Plugin Woocommerce. bỏ qua trang Giỏ hàng là cần thiết. Từ trang Sản phẩm, khách chọn mua xong sẽ chuyển thẳng đến trang form nhập thông tin Thanh toán.
- Trang Giỏ hàng sẽ được chuyển hướng sang trang Thanh toán.
Thêm đoạn code bên dưới vào file functions.php
function skip_cart_page_redirection_to_checkout() { if( is_cart() ) wp_redirect( wc_get_checkout_url() ); } add_action('template_redirect', 'skip_cart_page_redirection_to_checkout');
2. Giỏ hàng sẽ được xóa trước khi sản phẩm khác được thêm vào.
Thêm đoạn code bên dưới vào file functions.php
add_filter( 'woocommerce_add_to_cart_validation', 'remove_cart_item_before_add_to_cart', 20, 3 ); function remove_cart_item_before_add_to_cart( $passed, $product_id, $quantity ) { if( ! WC()->cart->is_empty()) WC()->cart->empty_cart(); return $passed; }
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
[url=https://teplica-teplourala.ru]Теплицы новгород купить.[/url]
[url=https://teplica-teplourala.ru]Прямостенные теплицы от производителя цены.[/url]
[url=https://teplica-teplourala.ru]Теплицы прямостенные от производителя.[/url]
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
wow, amazing
wow, amazing
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
naturally like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the truth on the other hand I will surely come again again.