Skip to content

Instantly share code, notes, and snippets.

@akther80
Created September 8, 2023 11:38
Show Gist options
  • Save akther80/f4b31f97e63955204ad0dfeb1f4ce732 to your computer and use it in GitHub Desktop.
Save akther80/f4b31f97e63955204ad0dfeb1f4ce732 to your computer and use it in GitHub Desktop.
MyTravel - Change Add to Cart text as Book
add_filter( 'woocommerce_product_single_add_to_cart_text', 'mas_travels_custom_single_add_to_cart_text' );
function mas_travels_custom_single_add_to_cart_text( $text ) {
$text = esc_html__( 'Book', 'mytravel' );
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment