• Avail 20% discount as we celebrate 10k+ active installs. Hurry Up!

Would like that the Store logo dont change the dashboard logo

WooCommerce Multivendor Marketplace – Home Forums WCFM – Ultimate Would like that the Store logo dont change the dashboard logo

This topic contains 6 replies, has 2 voices, and was last updated by Avatar  5 months, 1 week ago.

  • Author
    Posts
  • #39728
    Avatar
    acaua ferreira

    HI Team,

    I dont want that the vendor store logo (added at: setting>store logo),
    replace the logo added by admin,Im talking about the logo that appear above dashboard menu.

    example of my company logo that i dont wanna be replaced by vendor’s logo
    https://funday.tur.br/wp-content/uploads/2018/12/store-logo.png

  • #39796
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Well, I understand your requirement.

    Please add this code for the purpose ->

    add_filter( 'wcfm_store_logo', function( $logo_image_url ) {
    	global $WCFM;
    	$logo = ( get_option( 'wcfm_site_logo' ) ) ? get_option( 'wcfm_site_logo' ) : '';
    	$logo_image_url = wp_get_attachment_image_src( $logo, 'thumbnail' );
    	
    	if ( !empty( $logo_image_url ) ) {
    		$logo_image_url = $logo_image_url[0];
    	} else {
    		$logo_image_url = $WCFM->plugin_url . 'assets/images/your-logo-here.png';
    	}	
    	return $logo_image_url;
    }, 50 );

    Thank You

  • #40271
    Avatar
    acaua

    When this code is active, appear the logo url text, instead the image:
    https://funday.tur.br/wp-content/uploads/2018/12/logo-error.png

    I tried to replace ‘assets/images/your-logo-here.png’ from my logo url, but also did not worked.
    I tried also to add a new logo from zero, clear cache…

  • #40346
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Sorry my fault!

    Please use this revised code ->

    add_filter( 'wcfm_store_logo', function( $logo_image_url ) {
    	global $WCFM;
    	$logo = ( get_option( 'wcfm_site_logo' ) ) ? get_option( 'wcfm_site_logo' ) : '';
    	$logo_image_url = wp_get_attachment_image_src( $logo, 'thumbnail' );
    	
    	if ( !empty( $logo_image_url ) ) {
    		$logo_image_url = $logo_image_url[0];
    	} else {
    		$logo_image_url = $WCFM->plugin_url . 'assets/images/your-logo-here.png';
    	}
            $logo_image_url = '<a class="wcfm_store_logo_icon" href="'.get_permalink( wc_get_page_id( 'shop' ) ).'" target="_blank"><img src="' . $logo_image_url . '" alt="Store Logo" /></a>';
    	
    	return $logo_image_url;
    }, 50 );

The topic ‘Would like that the Store logo dont change the dashboard logo’ is closed to new replies.