title: WooCommerce back button on product page
body: <p>I have made a "back" button on my product pages with the following code:</p>
  
  <pre><code>add_action( 'woocommerce_before_single_product', 'back_button', 10 );
  
  function back_button() {
    global $product;
    echo ' &lt;button class="product-back-button" type="button" onclick="history.back();"&gt; &lt;&lt; Vissza&lt;/button&gt; '; 
  }
  </code></pre>
  
  <p>The only problem with it: when I make some action on the product page like "add to cart" and then hit the back button it just reloads the page and I need to push it again for the expected behavior. </p>
  
  <p>Do you know any fix for that?
  Thanks!</p>