WC_Admin_Setup_Wizard::get_wizard_shipping_methods()protectedWC 1.0

Deprecated from version 4.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Get shipping methods based on country code.

Method of the class: WC_Admin_Setup_Wizard{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_wizard_shipping_methods( $country_code, $currency_code );
$country_code(string) (required)
Country code.
$currency_code(string) (required)
Currency code.

Changelog

Deprecated since 4.6.0

WC_Admin_Setup_Wizard::get_wizard_shipping_methods() code WC 8.7.0

protected function get_wizard_shipping_methods( $country_code, $currency_code ) {
	_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
	$shipping_methods = array(
		'flat_rate'     => array(
			'name'        => __( 'Flat Rate', 'woocommerce' ),
			'description' => __( 'Set a fixed price to cover shipping costs.', 'woocommerce' ),
			'settings'    => array(
				'cost' => array(
					'type'          => 'text',
					'default_value' => __( 'Cost', 'woocommerce' ),
					'description'   => __( 'What would you like to charge for flat rate shipping?', 'woocommerce' ),
					'required'      => true,
				),
			),
		),
		'free_shipping' => array(
			'name'        => __( 'Free Shipping', 'woocommerce' ),
			'description' => __( "Don't charge for shipping.", 'woocommerce' ),
		),
	);

	return $shipping_methods;
}