Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a new WooCommerce Settings Tab
<?php
class WC_Settings_Tab_Demo {
public static function init() {
add_filter( 'woocommerce_settings_tabs_array', __CLASS__ . '::add_settings_tab', 50 );
}
public static function add_settings_tab( $settings_tabs ) {
$settings_tabs['settings_tab_demo'] = __( 'Settings Demo Tab', 'woocommerce-settings-tab-demo' );
return $settings_tabs;
}
}
WC_Settings_Tab_Demo::init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment