Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save stacklast/43ccf3c95a2082525914adc19f863343 to your computer and use it in GitHub Desktop.

Select an option

Save stacklast/43ccf3c95a2082525914adc19f863343 to your computer and use it in GitHub Desktop.
[WooComerce] - Add Back Button on the top before Sigle Product content
<?php
add_action( 'woocommerce_before_single_product', 'my_function_sample', 10);
function my_function_sample() {
global $product;
echo ' <button style="margin-top: 1.5em;" class="weforms_submit_btn" type="button" onclick="history.back();"> Go Back </button>' ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment