Skip to content

Instantly share code, notes, and snippets.

@WPprodigy
Created January 25, 2017 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save WPprodigy/d5892960ffc24fd3c7540dd3a2ec6517 to your computer and use it in GitHub Desktop.
Save WPprodigy/d5892960ffc24fd3c7540dd3a2ec6517 to your computer and use it in GitHub Desktop.
Add an extra button on single product pages in WooCommerce
add_action( 'woocommerce_after_add_to_cart_button', 'wc_ninja_add_extra_button', 20 );
function wc_ninja_add_extra_button() {
echo "<a href='#' class='button'>Return to shop</a>";
}
@Boyngaijr
Copy link

What plug-ins must be installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment