WC_Settings_Shipping::output
Output the settings.
Method of the class: WC_Settings_Shipping{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Settings_Shipping = new WC_Settings_Shipping(); $WC_Settings_Shipping->output();
WC_Settings_Shipping::output() WC Settings Shipping::output code WC 10.6.2
public function output() {
global $current_section, $hide_save_button;
// Load shipping methods so we can show any global options they may have.
$shipping_methods = $this->get_shipping_methods();
if ( '' === $current_section ) {
$this->output_zones_screen();
} elseif ( 'classes' === $current_section ) {
$hide_save_button = true;
$this->output_shipping_class_screen();
} else {
$is_shipping_method = false;
foreach ( $shipping_methods as $method ) {
if ( in_array( $current_section, array( $method->id, sanitize_title( get_class( $method ) ) ), true ) && $method->has_settings() ) {
$is_shipping_method = true;
$method->admin_options();
}
}
if ( ! $is_shipping_method ) {
parent::output();
}
}
}