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>';
}
2
Answers
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 ‘
HTML content.
‘;
}