WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Utilities

OrderController::get_coupon() protected WC 1.0

Convert a coupon code to a coupon object.

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

No Hooks.

Return

\WC_Coupon. Coupon object.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_coupon( $coupon_code );
$coupon_code(string) (required)
Coupon code.

Code of OrderController::get_coupon() WC 5.8.0

protected function get_coupon( $coupon_code ) {
	return new \WC_Coupon( $coupon_code );
}