Skip to content
Docs
Get RestroPress

Action

rpress_add_discount_form_top

Updated
On this page

Fires at the top of the Add Discount form, before the form table.

Runs right after the opening form tag of the Add New Discount screen. Use it to print hidden inputs or notices that belong to the form but not to a specific row. The action receives no arguments.

Example#

function my_add_discount_form_top() {
	echo '<input type="hidden" name="my_discount_source" value="admin" />';
}
add_action( 'rpress_add_discount_form_top', 'my_add_discount_form_top' );

Notes#

Printing a field does not save it. Save submitted values from rpress_post_insert_discount.

Source#

Fired from:

  • includes/admin/discounts/add-discount.php (line 22)

See also#

Was this page helpful?