R
R
Rider1612021-11-04 03:15:33
WooCommerce
Rider161, 2021-11-04 03:15:33

Redirect to checkout by clicking on a product - woocommerce?

how to make a redirect from the product description directly to the payment in woocommerce? (adding to the cart through a hook is done)

making a redirect is obtained only by pressing the "Add to cart" button

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry_Novik, 2021-11-04
@Dmitry_Novik

If I understand everything correctly.
Here is the redirect script when adding a product to the cart:

$('.КЛАСС').on('click',function(){
  document.location.href = '/checkout';
});

"Add to cart" does not look like a class, put the word "CLASS" instead of the correct one.
place in footer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question