Action
rpress_user_dashboard_panels
Fires after the built-in customer dashboard panels to add more.
Runs inside the dashboard content row, after the Profile, Orders and Addresses panels. Print one panel per item added through rpress_user_dashboard_menu_items, with the id matching the list item class. Panels are hidden by default and shown by the sidebar.
Available since RestroPress 3.5.
Example#
function my_dashboard_panel() {
echo '<div class="col-lg-9 col-12" id="user-my-rewards" style="display:none;">';
echo '<p>' . esc_html__( 'You have no rewards yet.', 'my-plugin' ) . '</p>';
echo '</div>';
}
add_action( 'rpress_user_dashboard_panels', 'my_dashboard_panel', 10, 0 );
Notes#
The panel element id must match the class of the sidebar item.
Source#
Fired from:
templates/rpress-user-dashboard.php(line 504)
See also#
Was this page helpful?
