WordPress at Your Fingertips
function is not described

wc_get_coupon_code_by_id() WC 3.0.0

Get coupon code by ID.

No Hooks.

Return

String.

Usage

wc_get_coupon_code_by_id( $id );
$id(int) (required)
Coupon ID.

Changelog

Since 3.0.0 Introduced.

Code of wc_get_coupon_code_by_id() WC 5.7.0

function wc_get_coupon_code_by_id( $id ) {
	$data_store = WC_Data_Store::load( 'coupon' );
	return empty( $id ) ? '' : (string) $data_store->get_code_by_id( $id );
}