(Revised answer)
I have changed my action to yours but it still doesn’t work. Here is
my repo for this plugin if you want to see. I’m at a loss at the
moment:
github.com/SeanDez/frequentVisitorCoupons
So I tried and tested your plugin, and noticed that you’ve got two “actions” (i.e. action
fields) on the same form.
-
<input type="hidden" name="action" value="handleNewCoupon" />
-
<input type="hidden" name="action" value="fromNewCouponForm">
So by now, I bet you know what happened?
I.e. The posted action is fromNewCouponForm
instead of the handleNewCoupon
(which is the correct one?). And since there’s no action hooked to admin_post_fromNewCouponForm
, then you got the blank (wp-admin/admin-post.php
) page.