wc_get_coupon_code_by_id( int $id )

Get coupon code by ID.


Description Description


Parameters Parameters

$id

(Required) Coupon ID.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-coupon-functions.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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.