I am a little wrong. It is better to add a filter to $message and $run because of the do_action does not work in this case.
@aberdov do your custom tool action functionalities using our do_action hook as follows –
add_action('wcmp_settings_tools_action_default_case', 'wcmp_settings_tools_action_default_case', 10, 2);
function wcmp_settings_tools_action_default_case($action, $request){
if($action == 'your_action_name'){
// do your action handler functionalities
// If your functionalities execute successfully, just echo your success message or else echo error message
// After it do exit;
$result = true; // lets assumed its return true;
if( $result ) {
echo '<div class="updated inline"><p>' . /*Your success message goes here*/ . '</p></div>';
} else {
echo '<div class="error inline"><p>' . /*Your error message goes here*/ . '</p></div>';
}
exit;
}
}
Hmm, did not guess just to display a message via ‘echo’ and then ‘exit’ from function.
Thank you very much.
I cannot understand why the vendor`s dashboard does not work? http://prntscr.com/ome6wp Standard WP theme. No errors in wp_debug. http://mklive.teepi.co.uk/dashboard/
Hi @aberdov, can you please check whether the debug mode is enabled (https://wordpress.org/support/article/debugging-in-wordpress/).
If debug mode is enabled and there is no error message in the site, please get in touch with us over our forum – https://wc-marketplace.com/support-forum/
@aberdov just make sure you have [wcmp_vendor]
shortcode in dashboard page content.
Thank you, @itzmekhokan Sure, I have it.