Hi there,
hmmm would require custom development for another shortcode to do this, and Woo doesn’t make it easy – Try this:
function db_display_current_endpoint() {
if ( is_account_page() ) {
$endpoint = WC()->query->get_current_endpoint();
switch ($endpoint) {
case "downloads":
$endpoint_title = "Downloads";
break;
case "orders":
$endpoint_title = "Orders";
break;
case "edit-address":
$endpoint_title = "Addresses";
break;
case "edit-account":
$endpoint_title = "Account";
break;
default:
$endpoint_title = "My Account";
break;
}
ob_start();
echo '<h2 class="endpoint-title">' . $endpoint_title . '</h2>';
return ob_get_clean();
}
}
add_shortcode( 'current_endpoint', 'db_display_current_endpoint' );
This provides the [current_endpoint]
shortcode
You can edit the $endpoint_title
variables to display a custom message.