Woocommerce Product sales report Pro changes

Because of adding two new plugins WooCommerce Wholesale Prices and WooCommerce Wholesale Prices Premium
Wholesale Buyer role is changed to Wholesale Customer and wholesale_buyer key is changed to wholesale_customer

So changes were made in file hm-product-sales-report.php
Path to file : \plugins\hm-product-sales-report-pro\hm-product-sales-report.php

SQL text was changed in last condition %wholesale_buyer% to %wholesale_customer% line:533

$sQL = “SELECT posts.ID
FROM wp_posts AS posts
LEFT JOIN wp_postmeta ON wp_postmeta.post_id = posts.ID
WHERE wp_postmeta.meta_key = ‘_customer_user’
AND wp_postmeta.meta_value IN (SELECT wp_users.ID FROM wp_usermeta
INNER JOIN wp_users ON wp_usermeta.user_id = wp_users.ID
WHERE wp_usermeta.meta_key = ‘wp_capabilities’
AND wp_usermeta.meta_value LIKE ‘%wholesale_customer%’)”;

Leave a Reply

Your email address will not be published.