Last active
February 19, 2022 13:26
-
-
Save lucianobragaweb/7544561 to your computer and use it in GitHub Desktop.
WP E-Commerce: Redirecionar ao carrinho quando clicar em comprar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // No formulário geralmente temos este código que por padrão não redirecina quando o usuário efetua a compra ?> | |
<form class="product_form" enctype="multipart/form-data" action="<?php echo $action; ?>" method="post" ></form> | |
<?php | |
// Para mudar isso, basta alterar a ACTION do formulário para: | |
echo get_option('shopping_cart_url'); | |
/* | |
* Solução encontrada aqui: http://getshopped.org/forums/topic/add-to-cart-button-redirect-to-cart/ | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment