In this article, I’ll show you how you can add your custom class on the body tag in wordpress with snippets.
Pest this code on your function.php file.
/**
* Adding Custom Class Name in Body Tag
*/
add_filter( 'body_class', function( $classes ) {
return array_merge( array( 'your-custom-class' ), $classes);
});
Make sure you have changed your “your-custom-class” with your desired class name.
That’s all. I hope this article helped you understand How to change WooCommerce’s “Add to cart” text with great snippets.


