WC_Report_Coupon_Usage::__construct()publicWC 1.0

Constructor.

Method of the class: WC_Report_Coupon_Usage{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Report_Coupon_Usage::__construct() code WC 9.4.2

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'] ) ) ) );
	}
}