Skip to content
Docs
Get RestroPress

Action

rpress_recount_tool_options

Updated
On this page

Fires inside the repair tool dropdown to add extra options.

Runs inside the select element of the Repair Restaurant Stats form, between the built-in recalculation options and the Reset Restaurant Data option. Echo option elements with a data-type attribute and a value containing the batch processor class name. A matching batch class and its registration are needed for the option to do anything.

Example#

function my_recount_tool_options() {
	echo '<option data-type="my-recount" value="My_Recount_Batch">' . esc_html__( 'Recalculate My Data', 'my-plugin' ) . '</option>';
}
add_action( 'rpress_recount_tool_options', 'my_recount_tool_options' );

Notes#

Pair it with rpress_recount_tool_descriptions, which prints the help text for each option.

Source#

Fired from:

  • includes/admin/tools.php (line 347), in rpress_tools_recount_stats_display()

See also#

Was this page helpful?