sorry to write to you again. but I did everything as indicated and still does not show what the seller writes in the tab:
https://wclovers.com/forums/topic/new-tab-at-store-page/
in wcfmmp-view-store.php (overridden within my child theme, then from wcfm / store (I show you a snippet between policies and review add my new tab):
case ‘policies’:
$ WCFMmp-> template-> get_template (‘store / wcfmmp-view-store-policies.php’, array (‘store_user’ => $ store_user, ‘store_info’ => $ store_info));
break;
case ‘shipments’:
$ WCFMmp-> template-> get_template (‘store / wcfmmp-view-store-shipments.php’, array (‘store_user’ => $ store_user, ‘store_info’ => $ store_info));
break;
case ‘reviews’:
$ WCFMmp-> template-> get_template (‘store / wcfmmp-view-store-reviews.php’, array (‘store_user’ => $ store_user, ‘store_info’ => $ store_info));
break;
in wcfmmp-view-store-envios.php:
<? php
$ vendor_id = $ store_user-> get_id ();
$ wcfm_vendor_envios = get_user_meta ($ vendor_id, ‘wcfm_vendor_envios’, true);
?>
and in functions.php: (remove the last part of the code add_filter (‘wcfmmp_store_default_template’)
add_action (‘wcfmmp_rewrite_rules_loaded’, function ($ wcfm_store_url) {
add_rewrite_rule ($ wcfm_store_url. ‘/ ([^ /] +) / shipments? $’, ‘index.php?’. $ wcfm_store_url. ‘= $ matches [1] & shipments = true’, ‘top’);
add_rewrite_rule ($ wcfm_store_url. ‘/ ([^ /] +) / posts / page /? ([0-9] {1,}) /? $’, ‘index.php?’. $ wcfm_store_url. ‘= $ matches [1] & paged = $ matches [2] & shipments = true ‘,’ top ‘);
}, fifty );
add_filter (‘query_vars’, function ($ vars) {
$ vars [] = ‘shipments’;
return $ vars;
}, fifty );
add_filter (‘wcfmmp_store_tabs’, function ($ store_tabs, $ store_id) {
$ store_tabs [‘shipments’] = ‘Shipments’;
return $ store_tabs;
}, 50, 2);
add_filter (‘wcfmp_store_tabs_url’, function ($ store_tab_url, $ tab) {
if ($ tab == ‘shipments’) {
$ store_tab_url. = ‘shipments’;
}
return $ store_tab_url;
}, 50, 2);
add_filter (‘wcfmp_store_default_query_vars’, function ($ query_var) {
global $ WCFM, $ WCFMmp;
if (get_query_var (‘shipments’)) {
$ query_var = ‘shipments’;
}
return $ query_var;
}, fifty );
add_action (‘end_wcfm_vendor_settings’, function ($ vendor_id) {
global $ WCFM, $ WCFMmp;
$ wcfm_vendor_envios = get_user_meta ($ vendor_id, ‘wcfm_vendor_envios’, true);
?>
<! – collapsible ->
<div class = “page_collapsible” id = “wcfm_settings_form_min_order_amount_head”>
<label class = “wcfmfa fa-cart-plus”> </label>
<? php _e (‘shipments’, ‘wc-frontend-manager’); ?> <span> </span>
</div>
<div class = “wcfm-container”>
<div id = “wcfm_settings_form_vendor_invoice_expander” class = “wcfm-content”>
<? php
$ WCFM-> wcfm_fields-> wcfm_generate_form_field (array (
“wcfm_vendor_envios_options” => array (‘label’ => __ (‘shipments’,’ wc-frontend-manager ‘),’ type ‘=>’ textarea ‘,’ class’ => ‘wcfm-textarea wcfm_ele wcfm_full_ele’, ‘ label_class’ => ‘wcfm_title wcfm_ele wcfm_full_ele_title’, ‘value’ => $ wcfm_vendor_envios),
));
?>
</div>
</div>
<div class = “wcfm_clearfix”> </div>
<! – end collapsible ->
<? php
}, 500);
add_action (‘wcfm_vendor_settings_update’, function ($ vendor_id, $ wcfm_settings_form) {
global $ WCFM, $ WCFMmp;
if (isset ($ wcfm_settings_form [‘wcfm_vendor_envios_options’])) {
$ wcfm_vendor_envios = $ wcfm_settings_form [‘wcfm_vendor_envios_options’];
update_user_meta ($ vendor_id, ‘wcfm_vendor_envios’, $ wcfm_vendor_envios);
}
}, 500, 2);