Skip to content

Instantly share code, notes, and snippets.

@lucianobragaweb
Last active February 19, 2022 13:26
Show Gist options
  • Save lucianobragaweb/7544561 to your computer and use it in GitHub Desktop.
Save lucianobragaweb/7544561 to your computer and use it in GitHub Desktop.
WP E-Commerce: Redirecionar ao carrinho quando clicar em comprar
<?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