Redirect to checkout page only when i click “Add to cart”

Hello,

i need to redirect visitor to “Checkout Page” only when he click on “Add to cart” and not with custom link,

Exemple : Sometimes i use a custom link like :

https://website.com/Page/?add-to-cart=2525

In this exemple i dont need to redirect user (Adding product only on cart and show page content) Redirecting to “Checkout Page” only when he click on “Add to cart button” in product page.

I use WordPress / Woocommerce.

Thanks.