WordPress at Your Fingertips
function is not described

WC_Report_Coupon_Usage::__construct() public WC 1.0

Constructor.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Report_Coupon_Usage = new WC_Report_Coupon_Usage();
$WC_Report_Coupon_Usage->__construct();

Code of WC_Report_Coupon_Usage::__construct() WC 5.8.0

public function __construct() {
	if ( isset( $_GET['coupon_codes'] ) && is_array( $_GET['coupon_codes'] ) ) {
		$this->coupon_codes = array_filter( array_map( 'sanitize_text_field', wp_unslash( $_GET['coupon_codes'] ) ) );
	} elseif ( isset( $_GET['coupon_codes'] ) ) {
		$this->coupon_codes = array_filter( array( sanitize_text_field( wp_unslash( $_GET['coupon_codes'] ) ) ) );
	}
}