Adding html at the top of WooCommerce edit coupon admin pages

I am struggling to add some simple html to the top of the edit coupon page. Am I using the wrong action hook? add_action( 'woocommerce_edit_coupon_form_before_coupon_data', 'add_html_next_to_coupon_code' ); function add_html_next_coupon_code() { echo '<p> HTML content.</p>'; }

Comment (1)

Jese Leos

September 13, 2024

Verified user

You have used right hook 'woocommerce_edit_coupon_form_before_coupon_data'. But missed to call same function. Your function name is add_html_next_coupon_code Please follow this code add_action( 'woocommerce_edit_coupon_form_before_coupon_data', 'add_html_next_coupon_code' ); function add_html_next_coupon_code() { echo '<p> HTML content.</p>'; }

You’ll be in good company