Skip to content

Instantly share code, notes, and snippets.

@sachyya
Last active September 18, 2020 07:41
Show Gist options
  • Save sachyya/c3210be00f7e6f5f803c4fdf60dfe491 to your computer and use it in GitHub Desktop.
Save sachyya/c3210be00f7e6f5f803c4fdf60dfe491 to your computer and use it in GitHub Desktop.
Change add to cart text for Zoom Meeting product
<?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