Closed bfiessinger closed 2 years ago
Since WooCommerce Admin is a part of WooCommerce for a while now. It would be helpful to integrate it in laravel-woocommerce.
Since the reports you will get from .../wc/v3/reports/ include very little data they are not that useful for most users.
.../wc/v3/reports/
Integrating the analyses we get from WooCommerce Admin could help here.
For example: I have created a new Coupon via laravel-woocommerce like
$data = [ 'code' => '10off', 'discount_type' => 'percent', 'amount' => '10', 'individual_use' => true, 'exclude_sale_items' => true, 'minimum_amount' => '100.00' ]; $coupon = Coupon::create($data); $coupon_id = $coupon->id; YourModel::
and the server responds with the coupon
{ "id": 719, "code": "10off", ... }
now using the ID we can easily track the coupon from outside like
$coupons = WooAnalytics::all('reports/coupons', [ 'coupons' => $coupon_id, 'before' => date('Y-m-d\T00:00:00', time()), 'after' => $coupon->date_created, ... ]);
If this is something you are willing to merge I would add some changes to this PR.
This would include:
reports/
find
Let me know what you think.
Hello @bfiessinger,
Thanks for your PR. Currently, I'm behind the schedule. I'll evaluate your request.
Since WooCommerce Admin is a part of WooCommerce for a while now. It would be helpful to integrate it in laravel-woocommerce.
Since the reports you will get from
.../wc/v3/reports/
include very little data they are not that useful for most users.Integrating the analyses we get from WooCommerce Admin could help here.
For example: I have created a new Coupon via laravel-woocommerce like
and the server responds with the coupon
now using the ID we can easily track the coupon from outside like
If this is something you are willing to merge I would add some changes to this PR.
This would include:
reports/
partfind
methodLet me know what you think.