How to add & save fields on discount?
-
I was able to display a custom field on the “ADD & EDIT DISCOUNT PAGE” using this codes:
function site_count_add_field() { echo '<tr> <th scope="row" valign="top"> <label for="edd-max-uses">Site Count</label> </th> <td> <input type="text" id="edd-site-count" name="sitecount" value="" style="width: 40px;"/> <p class="description">The amount of free activation in this coupon. Leave blank for 0.</p> </td> </tr>'; } add_action('edd_add_discount_form_before_max_uses', 'site_count_add_field'); function site_count_edit_field($discount_id, $discount) { echo ' <tr> <th scope="row" valign="top"> <label for="edd-max-uses">Site Count</label> </th> <td> <input type="text" id="edd-site-count" name="sitecount" value="" style="width: 40px;"/> <p class="description">The amount of free activation in this coupon. Leave blank for 0.</p> </td> </tr>'; } add_action('edd_edit_discount_form_before_max_uses', 'site_count_edit_field');
However, it won’t save anything whatever i tried to enter. Anybody know which step should i do next to make it work?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to add & save fields on discount?’ is closed to new replies.