In WooCommerce, I created a coupon like this.
$coupon_data = [
'code' => $code,
'amount' => '15',
];
$wooCommerceMRLiveV2 = WooCommerceConnection::wooCommerceMRLiveV2();
$retval2 = $wooCommerceMRLiveV2->post('coupons', $coupon_data);
And when the coupon code is used, I need to delete it manually. But according to API documentation, I can only delete coupons using id. But at the moment when the coupon code is used, I don't know the id. So, is there any method to delete the coupon using coupon code? Or can I retrieve id from code?