Add Text Before and After Add to Cart

// Before Add to Cart Button: Can be done easily with woocommerce_before_add_to_cart_button hook, example: add_action( ‘woocommerce_before_add_to_cart_button’, ‘before_add_to_cart_btn’ ); function before_add_to_cart_btn(){ echo ‘Some custom text here’; } // After Add to Cart Button: If you are going to add some custom text after “Add to Cart” button, woocommerce_after_add_to_cart_button hook should help you. Example of usage this hook add_action( ‘woocommerce_after_add_to_cart_button’, ‘after_add_to_cart_btn’ ); function after_add_to_cart_btn(){ echo ‘Some custom text here’; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.