• Resolved hammada1980

    (@hammada1980)


    hi there
    how can I remove User & logout in woocommerce My Account page
    I tried everything I know
    I tried to to add custom CSS throw Elementor

    .woocommerce-MyAccount-tabs .oceanwp-user-profile .user-info {
        display: none;
    }

    it disappear only in the Elementor Editor page when I preview the page it appears again
    what do think I can do next
    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Code looks good to me, ?please try to add the below CSS code from the Appearance > Customize > Custom CSS, and check.

    .woocommerce-MyAccount-tabs .oceanwp-user-profile {
        display: none;
    }

    If not resolved, kindly share a snapshot with the marked area that exactly you wanted to remove.

    Thread Starter hammada1980

    (@hammada1980)

    Finally!!
    thanks man it works
    I was this close to stat palying with
    /oceanwp/inc/woocommerce/woocommerce-config.php code ??

    /**
    		 * Add wrap and user info to the account navigation.
    		 *
    		 * @since 1.0.0
    		 */
    		public static function oceanwp_before_account_navigation() {
    
    			// Name to display
    			$current_user = wp_get_current_user();
    
    			if ( $current_user->display_name ) {
    				$name = $current_user->display_name;
    			} else {
    				$name = esc_html__( 'Welcome!', 'oceanwp' );
    			}
    			$name = apply_filters( 'ocean_user_profile_name_text', $name );
    
    			echo '<div class="woocommerce-MyAccount-tabs clr">';
    				echo '<div class="oceanwp-user-profile clr">';
    					echo '<div class="image">' . get_avatar( $current_user->user_email, 128 ) . '</div>';
    					echo '<div class="user-info">';
    						echo '<p class="name">' . esc_attr( $name ) . '</p>';
    						echo '<a class="logout" href="' . esc_url( wp_logout_url( get_permalink() ) ) . '">' . esc_html__( 'Logout', 'oceanwp' ) . '</a>';
    					echo '</div>';
    				echo '</div>';
    
    		}

    I know I can fix it form here but I prefer not to touch a .PHP file
    thanks again man I appreciate it

    • This reply was modified 3 years, 1 month ago by hammada1980.

    You are most welcome and glad to hear that solution worked well.??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User & logout in woocommerce My account page’ is closed to new replies.