WC_Settings_Payment_Gateways::suppress_store_alertspublicWC 1.0

Suppress the store-alerts WCAdmin feature on the WooCommerce Payments settings page and Reactified sections.

Method of the class: WC_Settings_Payment_Gateways{}

No Hooks.

Returns

Mixed. The modified features list.

Usage

$WC_Settings_Payment_Gateways = new WC_Settings_Payment_Gateways();
$WC_Settings_Payment_Gateways->suppress_store_alerts( $features );
$features(mixed) (required)
The WCAdmin features list.

WC_Settings_Payment_Gateways::suppress_store_alerts() code WC 10.3.3

public function suppress_store_alerts( $features ) {
	global $current_tab, $current_section;

	$feature_name = 'store-alerts';

	if ( is_array( $features ) &&
		in_array( $feature_name, $features, true ) &&
		self::TAB_NAME === $current_tab &&
		$this->should_render_react_section( $current_section ) ) {

		unset( $features[ array_search( $feature_name, $features, true ) ] );
	}

	return $features;
}