I'm new to building websites but I have figured out something. Any help to get me forward would be highly appreciated!
I have a WP site with WhoCommerce. I have managed to get a working login functionality but now I would like to display user specific information in the users own profile page.
I would like to get the following user specific information to display: Date of puchase - puchased service - how many puchased services
I have tried something like:
<?php
global $wpdb;
if ( is_user_logged_in() ) {
global $current_user;
get_currentuserinfo();
echo $current_user->display_name . ' Hi: ';}
$currentUser = get_current_user_id();
$customers = $wpdb->get_results("SELECT * FROM wp_wc_order_product_lookup . currentUser”);
?>
<table class="table table-hover">
<?php foreach($customers as $customer){ ?>
<tr>
<td><center><?php echo $customer->date_created; ?></center></td>
//etc.
</tr>
<?php } ?>
How should I change my code to get this user specific information displayed?