Hi @snnafrica
This will require certain level of custom development.
To change just the Add to cart text, you can use the following filters:
woocommerce_product_single_add_to_cart_text
woocommerce_product_add_to_cart_text
function prefix_change_add_to_cart_text( $text ) {
return esc_html__( 'Contact Seller', 'text-domain' );
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'prefix_change_add_to_cart_text' );
add_filter( 'woocommerce_product_add_to_cart_text', 'prefix_change_add_to_cart_text' );
To change the Add to cart button HTML on the shop page, use the following filter:
woocommerce_loop_add_to_cart_link
/**
* This function will change the 'Add to cart' button HTML
* on the shop page.
*/
function prefix_change_add_to_cart_text( $button_html, $product, $args ) {
return sprintf(
'<button>%s</button>',
esc_html__( 'Contact Seller', 'text-domain' )
);
}
add_filter( 'woocommerce_loop_add_to_cart_link', 'prefix_change_add_to_cart_text', 10, 3 );
This will at least help you get started.
Using JavaScript, you will have to change the functionality of clicking the button and showing the seller’s contact information instead.
You may need to hire a developer for this as this is related to customising WooCommerce core functionality.