Action
rpress_order_notification_manage_fields
On this page
Fires inside the Manage screen of an order email, after the standard fields.
Runs while the Order Notifications settings render the Manage panel for one email. A feature can print its own extra rows for that email. The output passes through the wp_kses() allowed-tag list at the end of the settings callback, so tags outside that list are stripped.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$order_status | string | Key of the email being managed. |
$order_settings | array | Saved settings for that email, or an empty array. |
Example#
add_action( 'rpress_order_notification_manage_fields', 'my_manage_email_fields', 10, 2 );
function my_manage_email_fields( $order_status, $order_settings ) {
if ( 'my_order_ready_sms' !== $order_status ) {
return;
}
$value = isset( $order_settings['my_delay'] ) ? $order_settings['my_delay'] : '';
echo '<tr><td><label>' . esc_html__( 'Delay (minutes)', 'my-plugin' ) . '</label></td><td><input type="number" name="rpress_settings[' . esc_attr( $order_status ) . '][my_delay]" value="' . esc_attr( $value ) . '" /></td></tr>';
}
Source#
Fired from:
includes/admin/settings/register-settings.php(line 3516), inrpress_order_notification_settings_callback()
See also#
Was this page helpful?
