WC_Admin_Setup_Wizard::get_wizard_shipping_methods()
Устарела с версии 4.6.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
Get shipping methods based on country code.
Метод класса: WC_Admin_Setup_Wizard{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_wizard_shipping_methods( $country_code, $currency_code );
- $country_code(строка) (обязательный)
- Country code.
- $currency_code(строка) (обязательный)
- Currency code.
Список изменений
Устарела с | 4.6.0 |
Код WC_Admin_Setup_Wizard::get_wizard_shipping_methods() WC Admin Setup Wizard::get wizard shipping methods 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; }