WordPress at a glance
function is not described

WC_API_Coupons::edit_coupon() public WC 1.0

Edit a coupon

{} It's a method of the class: WC_API_Coupons{}

No Hooks.

Return

Array|WP_Error.

Usage

$WC_API_Coupons = new WC_API_Coupons();
$WC_API_Coupons->edit_coupon( $id, $data );
$id(int) (required)
the coupon ID
$data(array) (required)
-

Code of WC_API_Coupons::edit_coupon() WC 5.0.0

<?php
public function edit_coupon( $id, $data ) {

	$id = $this->validate_request( $id, 'shop_coupon', 'edit' );

	if ( is_wp_error( $id ) ) {
		return $id;
	}

	return $this->get_coupon( $id );
}