Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFTrick/16edd9016918232c31ad to your computer and use it in GitHub Desktop.
Save BFTrick/16edd9016918232c31ad to your computer and use it in GitHub Desktop.
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