Frontend Manager - How to remove from the frontend manager on vendor backend option to change store slugs

If you would like to remove from the frontend manager on vendor backend the option of the vendor to change the slug for his store name, you can use this code in your functions.php file, locate in the main root of your theme folder.

 

if( function_exists( 'YITH_Frontend_Manager' ) ){
add_action( 'wp_enqueue_scripts', 'yith_wcfm_remove_slug_for_vendor', 20 );
if( ! function_exists( 'yith_wcfm_remove_slug_for_vendor' ) ){
function yith_wcfm_remove_slug_for_vendor(){
$gui = YITH_Frontend_Manager()->gui;

if( ! empty( $gui ) && $gui->is_main_page() && isset( $_GET['page'] ) && 'yith_vendor_settings' == $_GET['page']){
wc_enqueue_js( "jQuery('#vendor_slug').parent('.form-field').css( 'display', 'none' ).remove();" );
}
}
}
}

 

 

Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk