Automattic\WooCommerce\Admin\Features\Blueprint\Importers

ImportSetWCShipping::filter_shipping_methods_data()protectedWC 1.0

Filter shipping methods data.

Method of the class: ImportSetWCShipping{}

No Hooks.

Return

Mixed.

Usage

// protected - for code of main (parent) or child class
$result = $this->filter_shipping_methods_data( $methods );
$methods(array) (required)
The shipping methods.

ImportSetWCShipping::filter_shipping_methods_data() code WC 9.7.1

protected function filter_shipping_methods_data( $methods ) {
	return array_map(
		function ( $method ) {
			unset( $method->settings );
			return $method;
		},
		$methods
	);
}