Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom Template -- WooCommerce 2.1.x / 2.0.x -- Für "Mein Konto" --- Geht ins Theme/ Child Theme unter: wp-content/themes/*dein-theme*/woocommerce/myaccount/my-account.php --- 2 Beispiele unten, Zeile 19 ist die entscheidende :)
<?php
/**
* My Account page
*
* @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>).', 'woocommerce' ) . ' <br />',
$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 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 ) ); ?>
<?php wc_get_template( 'myaccount/my-address.php' ); ?>
<?php do_action( 'woocommerce_after_my_account' ); ?>
<?php
/**
* My Account page
*
* @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(
'<div>' . __( 'Hello <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>).', 'woocommerce' ) . '</div><div><p>Custom Stuff here...</p></div>',
$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 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 ) ); ?>
<?php wc_get_template( 'myaccount/my-address.php' ); ?>
<?php do_action( 'woocommerce_after_my_account' ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment