Unknown error WooCommerce API Integration

alexpaul

Registered
Jul 24, 2018
2
0
1
United states
cPanel Access Level
Website Owner
I want to create a custom dashboard using API in WooCommerce. I am not much aware of PHP. I am doing it myself following the reference article WooCommerce API Integration
cloudways.com/blog/custom-dashboard-using-woocommerce-php-rest-api/


I am getting an unknown error in the index.php file.


$query = ['date_min' => '2018-11-01', 'date_max' => '2018-11-30'];

$sales = $woocommerce->get('reports/sales', $query);

$sale = $sales[0]["total_sales"];

}
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
Hello @alexplaul


What exactly is the error you're getting? I should point out that this may be best addressed with woo commerce directly: Contact Us - WooCommerce

Thanks!