Fix: use wp_get_current_user...

This commit is contained in:
Ryan Halliday 2019-03-01 11:37:07 +13:00
parent 640bf74b6c
commit cf78f45e38

View file

@ -68,7 +68,7 @@ function som_repeat_purchase_buttons() {
$once = 0;
$end = false;

if ( wc_customer_bought_product( get_current_user()->user_email, get_current_user_id(), $product->get_id() ) && ($product->downloadable == 'yes') ) {
if ( wc_customer_bought_product( wp_get_current_user()->user_email, get_current_user_id(), $product->get_id() ) && ($product->downloadable == 'yes') ) {

if ($customers_downloadable_products === 0){
$customer = WC()->customer;