Display woocommerce billing address on a custom page
-
Hi,
I would like display the billing address on a custom page in my website. For this, I created a custom template with this code:
<?php /* Template Name: List Users */ get_header(); ?> <div id="primary"> <main id="main" class="site-main" role="main"> <div id="pageTitle"> <h2>Onde Comprar</h2> </div> <div id="pageText"> <p> A Editora Conclave distribui e tem parcerias com vários lojistas pelo Brasil, você pode localizar a loja mais próxima a você ou se preferir poderá comprar na nossa loja virtual, <a href="https://conclaveweb.com.br/loja/">clicando aqui</a>. </p> </div> <div id="searchContainer"></div> <ul id="userListContainer"> <?php // WP_User_Query arguments $args = array( 'meta_key' => 'first_name', 'role' => 'shopkeeper', //'search' => 'first_name', 'search_columns' => array('first_name', 'city', 'state'), 'order' => 'ASC', 'orderby' => 'meta_value', 'fields' => 'all_with_meta', ); // The User Query $users = new WP_User_Query($args); // User Loop if (!empty($users->results)) { foreach ($users->results as $user) { echo //get_author_posts_url( $user->ID ) . the_author_meta( 'user_url', $user->ID ) . '<li>' . '<a href="' . esc_url(get_author_posts_url($user->ID)) . '">' . '<div id="userImage">' . get_avatar($user->ID) . '</div>' . '<div id="userInfo">' . esc_attr($user->first_name) . ' ' . esc_attr($user->last_name) . '<br>' . 'CEP: ' . esc_attr($user->post_code) . ' — ' . esc_attr($user->city) . ', ' . esc_attr($user->state) . '<br>' . '</a>' . '<a href="' . esc_attr($user->user_url) . '">' . esc_attr($user->user_url) . '</a>' . '</div>' . '</li>'; } } else { echo 'Nenhum usuário encontrado.'; } ?> </ul> </main><!-- #main --> </div><!-- #primary --> <?php //do_action( 'ekommart_sidebar' ); get_footer(); ?>But I do not know how to display the Woocommerce billing address after the last name the user.
Any help will be welcome! Thank’s!!
-
Hi there,
Please contact WooCommerce support directly for help with their plugin. The forum you’re posting in now is for the hosting provider, WordPress.com, and we can only help with sites hosted on our servers.
If you’re using the free version of WooCommerce, you can post in their community forum here:
https://wordpress.org/support/plugin/woocommerce/
Or, if you’re using any premium or payment gateway add-on downloaded from WooCommerce.com, you can reach live chat and email support here:
-
Hello!
I made this:
https://wordpress.org/support/topic/display-woocommerce-billing-address-on-a-custom-page/
Thanks!
- The topic ‘Display woocommerce billing address on a custom page’ is closed to new replies.