can someone help me with this issue ? I want to add a button in my product page and name it (contact seller) and I want to link this button to the seller page. how can I do it ?

here is a screenshot for what i'm looking to achieve

enter image description here


You can use woocommerce_single_product_summary hook to add custom button in the single product page in WooCommerce. Please check following example. Custom link added and button class is given to display it like a button.

add_action( 'woocommerce_single_product_summary', 'wpso_add_seller_button', 15 );
function wpso_add_seller_button() {
    echo '<a href="https://example.com" class="button">Contact Seller</a>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.