/** * @param $page */ function get_url($page) { switch ($page) { case 'sign_out': return wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount')); case 'edit_account_url': return wc_customer_edit_account_url(); } }
<!-- Home header title --> <h1 class="page__title"> <?php printf(__('Hello %1$s', 'woocommerce') . ' ', $current_user->display_name); ?> </h1> <div class="steps__frame"> <p> <?php printf(__('Are you not %1$s? <a href="%2$s">Sign out</a>.', 'woocommerce') . ' ', $current_user->display_name, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); ?> <br> <?php printf(__('Here you can view your recent orders and <a href="%s">edit your password and account details</a>.', 'woocommerce'), wc_customer_edit_account_url()); ?> </p> </div> <div class="home__intro__section__mascotte"> </div> </section> </div> <?php do_action('woocommerce_before_my_account'); ?>
function laboutique_my_account_sidebar_nav($args = array()) { ?> <ul<?php if ($args['class']) { ?> class="<?php echo $args['class']; ?> "<?php } ?> > <li><a href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?> " title="<?php _e('My Account', DOMAIN); ?> "><?php _e('My Account', DOMAIN); ?> </a></li> <?php $myaccount_page_id = get_option('woocommerce_myaccount_page_id'); if ($myaccount_page_id) { $logout_url = wp_logout_url(get_permalink($myaccount_page_id)); if (get_option('woocommerce_force_ssl_checkout') == 'yes') { $logout_url = str_replace('http:', 'https:', $logout_url); } } ?> <li><a href="<?php echo wc_customer_edit_account_url(); ?> " title=""><?php echo __("Edit Account", DOMAIN); ?> </a></li> <li><a href="<?php echo wc_get_endpoint_url('edit-address', 'billing'); ?> "><?php echo __("Edit Billing Address", DOMAIN); ?> </a></li> <li><a href="<?php echo wc_get_endpoint_url('edit-address', 'shipping'); ?> "><?php echo __("Edit Shipping Address", DOMAIN); ?> </a></li> <li><a href="<?php echo get_permalink(get_option('woocommerce_cart_page_id')); ?> "><?php echo _e('Shopping cart', DOMAIN); ?> </a></li> <li><a href="<?php echo $logout_url; ?> " title="<?php _e('Logout', DOMAIN); ?> "><?php _e('Logout', DOMAIN); ?> </a></li> </ul> <?php }
function bearded_woocommerce_nav() { global $wp, $post, $yith_wcwl; if (function_exists('is_woocommerce')) { ?> <nav class="shop-nav"> <ul class="account-menu"> <?php if (is_user_logged_in()) { ?> <li class="my-account <?php echo !empty($post) && $post->ID == wc_get_page_id('myaccount') && !array_key_exists(get_option('woocommerce_myaccount_edit_account_endpoint'), $wp->query_vars) ? 'active' : ''; ?> "> <a class="tiptip icon-user" title="<?php _e('My Account', 'bearded'); ?> " href="<?php echo get_permalink(wc_get_page_id('myaccount')); ?> "> <span class="link-title"><?php _e('My Account', 'bearded'); ?> </span> </a> </li> <li class="edit-account <?php echo !empty($post) && $post->ID == wc_get_page_id('myaccount') && array_key_exists(get_option('woocommerce_myaccount_edit_account_endpoint'), $wp->query_vars) ? 'active' : ''; ?> "> <a class="tiptip icon-pencil" title="<?php _e('Edit Account', 'bearded'); ?> " href="<?php echo wc_customer_edit_account_url(); ?> "> <span class="link-title"><?php _e('Edit Account', 'bearded'); ?> </span> </a> </li> <li class="visit-shop <?php echo get_query_var('post_type') == 'product' ? 'active' : ''; ?> "> <a class="tiptip icon-home" title="<?php _e('Visit Shop', 'bearded'); ?> " href="<?php echo get_permalink(wc_get_page_id('shop')); ?> "> <span class="link-title"><?php _e('Visit Shop', 'bearded'); ?> </span> </a> </li> <?php if ($yith_wcwl) { ?> <li class="wishlist <?php echo !empty($post) && $post->ID == get_option('yith_wcwl_wishlist_page_id') ? 'active' : ''; ?> "> <a class="tiptip icon-magic" title="<?php _e('View Wishlist', 'bearded'); ?> " href="<?php echo $yith_wcwl->get_wishlist_url(); ?> "> <span class="link-title"><?php _e('View Wishlist', 'bearded'); ?> </span> </a> </li> <?php } ?> <li class="logout"> <a class="tiptip icon-signout" title="<?php _e('Logout', 'bearded'); ?> " href="<?php echo wp_logout_url($_SERVER['REQUEST_URI']); ?> "> <span class="link-title"><?php _e('Logout', 'bearded'); ?> </span> </a> </li> <?php } else { ?> <li class="visit-shop <?php echo get_query_var('post_type') == 'product' ? 'active' : ''; ?> "> <a class="tiptip icon-home" title="<?php _e('Visit Shop', 'bearded'); ?> " href="<?php echo get_permalink(wc_get_page_id('shop')); ?> "> <span class="link-title"><?php _e('Visit Shop', 'bearded'); ?> </span> </a> </li> <li class="login <?php echo !empty($post) && $post->ID == wc_get_page_id('myaccount') && !array_key_exists(get_option('woocommerce_myaccount_lost_password_endpoint'), $wp->query_vars) ? 'active' : ''; ?> "> <a class="tiptip icon-signin" title="<?php _e('Login', 'bearded'); ?> " href="<?php echo get_permalink(wc_get_page_id('myaccount')); ?> "> <span class="link-title"><?php _e('Login', 'bearded'); ?> </span> </a> </li> <li class="lost-password <?php echo !empty($post) && $post->ID == wc_get_page_id('myaccount') && array_key_exists(get_option('woocommerce_myaccount_lost_password_endpoint'), $wp->query_vars) ? 'active' : ''; ?> "> <a class="tiptip icon-key" title="<?php _e('Lost Password', 'bearded'); ?> " href="<?php echo wc_lostpassword_url(); ?> "> <span class="link-title"><?php _e('Lost Password', 'bearded'); ?> </span> </a> </li> <?php } ?> </ul> <ul class="cart"> <li class="cart-container"> <?php bearded_cart_widget(); ?> </li> </ul> </nav> <?php } }
<p>Nombre: <strong><?php echo get_first_name(); ?> </strong></p> <p>Apellido: <strong><?php echo get_last_name(); ?> </strong></p> <p>Correo: <strong><?php echo get_email(); ?> </strong></p> <div class="[ text-left ][ margin-top ]"> <?php printf(__('<a class="[ color-primary ][ btn btn-primary btn-hollow btn-sm ][ inline-block ]" href="%s">editar detalles</a>', 'woocommerce'), wc_customer_edit_account_url()); ?> </div> </section> <?php wc_get_template('myaccount/my-address.php'); ?> </div> <div class="[ col-xs-12 col-sm-6 ]"> <?php do_action('woocommerce_before_my_account'); ?>
<li role="presentation"><a href="#orders" aria-controls="orders" role="tab" data-toggle="tab">My Orders</a></li> <li role="presentation"><a href="#address" aria-controls="address" role="tab" data-toggle="tab">My Addresses</a></li> <li role="presentation"><a href="#accountsettings" aria-controls="address" role="tab" data-toggle="tab">My Account Settings</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane fade in active" id="dashboard"> <?php printf(__('Hello <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>).', 'woocommerce') . ' ', $current_user->display_name, wp_logout_url(get_permalink(wc_get_page_id('myaccount')))); printf(__('From your account dashboard you can view your recent orders, manage your shipping and billing addresses.', 'woocommerce'), wc_customer_edit_account_url()); ?> </div> <div role="tabpanel" class="tab-pane fade" id="downloads"> <?php wc_get_template('myaccount/my-downloads.php'); ?> </div> <div role="tabpanel" class="tab-pane fade" id="orders"> <?php
<?php /** * My Account page * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly wc_print_notices(); echo beans_open_markup('woo_my_account_user', 'p', array('class' => 'myaccount_user')); printf(__('Hello ' . beans_open_markup('woo_my_account_user_name', 'strong') . '%1$s' . beans_close_markup('woo_my_account_user_name', 'strong') . ' (not %1$s? ' . beans_open_markup('woo_my_account_user_logout_link', 'a', array('href' => '%2$s')) . 'Sign out' . beans_close_markup('woo_my_account_user_logout_link', 'a'), 'woocommerce') . ' ', $current_user->display_name, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); printf(__('From your account dashboard you can view your recent orders, manage your shipping and billing addresses and ' . beans_open_markup('woo_my_account_user_account_link', 'a', array('href' => '%s')) . 'edit your password and account details' . beans_close_markup('woo_my_account_user_account_link', 'a'), 'woocommerce'), wc_customer_edit_account_url()); echo beans_close_markup('woo_my_account_user', 'p'); do_action('woocommerce_before_my_account'); wc_get_template('myaccount/my-downloads.php'); wc_get_template('myaccount/my-orders.php', array('order_count' => $order_count)); wc_get_template('myaccount/my-address.php'); do_action('woocommerce_after_my_account');
* @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } wc_print_notices(); ?> <p class="myaccount_user"> <?php // print_r($current_user); printf(__('Hello <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>).', 'woocommerce') . ' ', $current_user->user_email, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); printf(__('From your account dashboard you can view your recent orders, manage your shipping and billing addresses and <a href="%s">edit your password and account details</a>.', 'woocommerce'), wc_customer_edit_account_url()); ?> </p> <?php do_action('woocommerce_before_my_account'); ?> <?php wc_get_template('myaccount/my-downloads.php'); ?> <?php wc_get_template('myaccount/my-orders.php', array('order_count' => $order_count)); ?>
* @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } wc_print_notices(); ?> <p class="myaccount_user"> <?php echo '<div class="woocommerce-info">'; printf(__('Hello <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>).', 'woocommerce') . ' ', $current_user->display_name, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); printf(__('From your account dashboard you can <a href="%s">edit your password and account details</a>.', 'woocommerce'), wc_customer_edit_account_url()); echo '</div>'; ?> </p> <?php do_action('woocommerce_before_my_account'); ?> <?php wc_get_template('myaccount/my-downloads.php'); ?> <?php wc_get_template('myaccount/my-orders.php', array('order_count' => $order_count)); ?>
* * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } wc_print_notices(); ?> <div class="sidebar-primary row account-downloads"> <div class="sidebar"> <h2>Account Details <small> <?php printf(__('[<a href="%s">Edit</a>]', 'woocommerce'), wc_customer_edit_account_url()); ?> </small></h2> <p class="myaccount_user"> <?php printf(__('<strong>%1$s</strong>', 'woocommerce') . ' ', $current_user->user_email, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); ?> </p> <?php wc_get_template('myaccount/my-address.php'); ?> </div> <?php wc_get_template('myaccount/my-downloads.php');
* @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $woocommerce; wc_print_notices(); ?> <p class="myaccount_user"> <?php printf(__('Hello, <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>)', 'yit') . __('From your account dashboard you can view your recent orders, manage your shipping and billing addresses and <a href="%3$s">change your password</a>.', 'yit'), $current_user->display_name, wp_logout_url(get_permalink(wc_get_page_id('myaccount'))), wc_customer_edit_account_url()); ?> </p> <?php do_action('woocommerce_before_my_account'); ?> <?php wc_get_template('myaccount/my-downloads.php'); ?> <?php wc_get_template('myaccount/my-orders.php', array('order_count' => $order_count)); ?>
/** * Get My Account URL * * @return string Formatted URL string */ public static function get_myaccount_url() { if (self::is_wc_2_1()) { return wc_customer_edit_account_url(); } else { return get_permalink(woocommerce_get_page_id('myaccount')); } }
<?php global $opCliente; ?> <div class="[ container ]"><!-- end ina my-address --> <div class="[ row ]"> <section class="[ col-sm-3 ][ bg-gray-lighter ]"> <article class="[ margin-bottom ]"> <?php printf(__('<h2 class="[ no-margin ]">%1$s</h2> <a href="%2$s" class="[ underline ][ color-secondary ]"><em>salir</em></a>', 'woocommerce') . ' ', $current_user->display_name, wc_get_endpoint_url('customer-logout', '', wc_get_page_permalink('myaccount'))); printf(__('<a class="[ color-secondary ][ underline ]" href="%s"><em>editar</em></a>', 'woocommerce'), wc_customer_edit_account_url()); ?> </article> <article> <?php wc_get_template('myaccount/my-address.php'); ?> </article> </section> <section class="[ col-xs-12 col-sm-8 ]"> <?php if ($opCliente->clubId == '' || $opCliente->clubId == 0) { ?> <article class="[ padding--bottom margin-bottom ]"> <p>Para continuar favor de seleccionar un club de consumo</p> <form id="select-club" method="POST" class="select-club"> <table>
/** * User top navigation menu * * @return void */ function dokan_header_user_menu() { ?> <ul class="nav navbar-nav navbar-right"> <li> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php printf(__('Cart %s', 'dokan'), '<span class="dokan-cart-amount-top">(' . WC()->cart->get_cart_total() . ')</span>'); ?> <b class="caret"></b></a> <ul class="dropdown-menu"> <li> <div class="widget_shopping_cart_content"></div> </li> </ul> </li> <?php if (is_user_logged_in()) { ?> <?php global $current_user; $user_id = $current_user->ID; if (dokan_is_user_seller($user_id)) { ?> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Seller Dashboard', 'dokan'); ?> <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="<?php echo dokan_get_store_url($user_id); ?> " target="_blank"><?php _e('Visit your store', 'dokan'); ?> <i class="fa fa-external-link"></i></a></li> <li class="divider"></li> <?php $nav_urls = dokan_get_dashboard_nav(); foreach ($nav_urls as $key => $item) { printf('<li><a href="%s">%s %s</a></li>', $item['url'], $item['icon'], $item['title']); } ?> </ul> </li> <?php } ?> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo esc_html($current_user->display_name); ?> <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="<?php echo dokan_get_page_url('my_orders'); ?> "><?php _e('My Orders', 'dokan'); ?> </a></li> <li><a href="<?php echo dokan_get_page_url('myaccount', 'woocommerce'); ?> "><?php _e('My Account', 'dokan'); ?> </a></li> <li><a href="<?php echo wc_customer_edit_account_url(); ?> "><?php _e('Edit Account', 'dokan'); ?> </a></li> <li class="divider"></li> <li><a href="<?php echo wc_get_endpoint_url('edit-address', 'billing', get_permalink(wc_get_page_id('myaccount'))); ?> "><?php _e('Billing Address', 'dokan'); ?> </a></li> <li><a href="<?php echo wc_get_endpoint_url('edit-address', 'shipping', get_permalink(wc_get_page_id('myaccount'))); ?> "><?php _e('Shipping Address', 'dokan'); ?> </a></li> </ul> </li> <li><?php wp_loginout(home_url()); ?> </li> <?php } else { ?> <li><a href="<?php echo dokan_get_page_url('myaccount', 'woocommerce'); ?> "><?php _e('Log in', 'dokan'); ?> </a></li> <li><a href="<?php echo dokan_get_page_url('myaccount', 'woocommerce'); ?> "><?php _e('Sign Up', 'dokan'); ?> </a></li> <?php } ?> </ul> <?php }
* @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $woocommerce; wc_print_notices(); ?> <p class="myaccount_user"> <?php echo '<div class="bold myaccount_desc">'; printf(__('Welcome back, <span>%s</span> !', 'wpdance'), $current_user->display_name); printf(__('</br><u><a class="bold" href="%s">Change password</a></u><br/>', 'wpdance'), esc_url(wc_customer_edit_account_url())); echo '<u><a class="bold" href="' . wp_logout_url(get_permalink(woocommerce_get_page_id('myaccount'))) . '">' . __('Log out', 'wpdance') . '</a></u>'; echo '</div>'; ?> </p> <?php do_action('woocommerce_before_my_account'); ?> <?php wc_get_template('myaccount/my-downloads.php'); ?> <?php wc_get_template('myaccount/my-orders.php', array('order_count' => $order_count));
/** * @deprecated */ function woocommerce_customer_edit_account_url() { return wc_customer_edit_account_url(); }
/** * Redirect back to the provided return_url * * @since 1.0 * @param string $type redirect type, currently only `error` or null * @param int $user_id the user ID. Default 0. */ public function redirect($type = null, $user_id = 0) { $user = get_user_by('id', $user_id); if (isset($user->user_email) && '' === $user->user_email) { $return_url = add_query_arg('wc-social-login-missing-email', 'true', wc_customer_edit_account_url()); } else { $return_url = get_transient('wcsl_' . md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'])); $return_url = $return_url ? esc_url(urldecode($return_url)) : SV_WC_Plugin_Compatibility::wc_get_page_permalink('myaccount'); delete_transient('wcsl_' . md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'])); } if ('error' == $type) { // using a query arg because wc_add_notice() only works when the WC session is available // which is only on the cart/checkout pages $return_url = add_query_arg('wc-social-login-error', 'true', $return_url); } wp_redirect(esc_url_raw($return_url)); exit; }
* @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } wc_print_notices(); ?> <p class="myaccount_user"> <?php printf( __( 'Not %1$s? <a href="%2$s">Sign out</a>.', 'yit' ) . ' ', $current_user->display_name, wp_logout_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) ); printf( __( 'From your account dashboard you can view your recent orders, manage your shipping and billing addresses and <a href="%s">edit your password and account details</a>.', 'yit' ), wc_customer_edit_account_url() ); ?> </p> <?php do_action( 'woocommerce_before_my_account' ); ?> <?php wc_get_template( 'myaccount/my-orders.php', array( 'order_count' => 1 ) ); ?> <?php wc_get_template( 'myaccount/my-address.php' ); ?> <?php do_action( 'woocommerce_after_my_account' ); ?>
public function widget($args, $instance) { $dash_notice_login = apply_filters('widget_dash_notice_login', @$instance['dash_notice_login']); $dash_notice_logout = apply_filters('widget_dash_notice_logout', @$instance['dash_notice_logout']); // Before and after the widget echo $args['before_widget']; // The Output ?> <div class="dash-all"> <?php esc_html_e('Welcome', 'wise-blog'); echo ', '; ?> <div class="dash-gravatar"><?php global $userdata; wp_get_current_user(); echo wp_kses_post(get_avatar(@$userdata->ID, 50)); ?> </div> <h2 class="dash-name"><?php if (is_user_logged_in()) { echo esc_attr(wp_get_current_user()->display_name); } else { esc_html_e('Guest', 'wise-blog'); } ?> </h2> <?php if (is_user_logged_in()) { ?> <div class="dash-tools"> <a href="<?php echo esc_url(home_url('/') . 'wp-admin/'); ?> "><?php esc_html_e('Dashboard', 'wise-blog'); ?> </a> <?php if (function_exists('is_woocommerce') && is_woocommerce()) { echo '<a class="dash-home" href="' . wc_customer_edit_account_url() . '">' . esc_html__('Edit Account', 'wise-blog') . '</a>'; } else { echo '<a class="dash-home" href="' . esc_url(home_url('/') . 'wp-admin/profile.php') . '">' . esc_html__('Edit Account', 'wise-blog') . '</a>'; } ?> </div> <a class="dash-out" href="<?php echo wp_logout_url(home_url('/')); ?> "><?php esc_html_e('Log out', 'wise-blog'); ?> </a> <span class="dash-notice"><i><?php echo esc_attr($dash_notice_login); ?> </i></span> <?php } else { ?> <div class="dash-tools"> <a class="lg-in" href="<?php if (function_exists('is_woocommerce')) { echo get_permalink(get_option('woocommerce_myaccount_page_id')); } else { echo esc_url(home_url('/') . 'wp-admin/'); } ?> "><?php esc_html_e('Login', 'wise-blog'); ?> </a> <a class="lg-reg dash-home" href="<?php echo esc_url(home_url('/') . 'wp-login.php?action=register'); ?> "><?php esc_html_e('Register', 'wise-blog'); ?> </a> </div> <span class="dash-notice"><i><?php echo esc_attr($dash_notice_logout); ?> </i></span> <?php } ?> </div> <?php echo $args['after_widget']; }