Skip to content

Instantly share code, notes, and snippets.

@finalwebsites
Created September 29, 2023 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save finalwebsites/9ed4dada310c098a4f9d52628fdf90f2 to your computer and use it in GitHub Desktop.
Save finalwebsites/9ed4dada310c098a4f9d52628fdf90f2 to your computer and use it in GitHub Desktop.
WordPress hooks add-to-cart button replacement
<?php
add_filter( 'woocommerce_is_purchasable', '__return_false'); // disable the default button
add_action( 'woocommerce_single_product_summary', 'fw_add_offer_request_button', 30 );
function fw_add_offer_request_button(){
echo '<button>Offerte aanvragen</button>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment