<?php
// add a new tab to the profile page using wpc_profile_tabs filter
add_filter('wpc_profile_tabs', 'wpc_woo_profile_tabs');
function wpc_woo_profile_tabs($content) {
// $_GET['wpc_view'] holds the active tab value.
$class = '';
if(isset($_GET['wpc_view'])){
$class = $_GET['wpc_view'] == 'my-tab' ? 'wpc-tab-active' : '';
}
return $content . '<a class="wpc-tab ' . $class . '" href="?wpc_view=my-tab"><i class="fa fa-dollar"></i> My Tab</a>';
}
// add the tab content using the filter wpc_profile_tab_content
add_filter('wpc_profile_tab_content', 'wpc_profile_woo_content');
function wpc_profile_woo_content($content){
if( $_GET['wpc_view'] == 'my-tab' ){
$content .= 'Your content here.';
}
return $content;
}
?>