Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created November 20, 2018 05:57
Show Gist options
  • Save yousufansa/3184de4964b1eb23208d22beee32ae92 to your computer and use it in GitHub Desktop.
Save yousufansa/3184de4964b1eb23208d22beee32ae92 to your computer and use it in GitHub Desktop.
Jobhunt - Change Add to cart Button Text
if ( ! function_exists( 'jh_child_woocommerce_product_add_to_cart_text' ) ) {
function jh_child_woocommerce_product_add_to_cart_text( $text ) {
if ( $text == 'Add to cart' ) {
$text = esc_html__( 'Your Button Text', 'jobhunt' );
}
return $text;
}
}
add_filter( 'woocommerce_product_add_to_cart_text', 'jh_child_woocommerce_product_add_to_cart_text' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment