WordPress at a glance
function is not described

wc_get_coupon_code_by_id() WC 3.0.0

Get coupon code by ID.

No Hooks.

Return

String. Nothing.

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.3.0

<?php
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 );
}