Last active
September 18, 2020 07:41
-
-
Save sachyya/c3210be00f7e6f5f803c4fdf60dfe491 to your computer and use it in GitHub Desktop.
Change add to cart text for Zoom Meeting product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_product_add_to_cart_text', function( $text, $instance ) { | |
$product_type = $instance->get_type(); | |
if( 'zoom_meeting' === $product_type ) { | |
return esc_html__( 'Add to Cart', 'theme-slug' ); | |
} | |
return $text; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment