Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active August 29, 2015 14:01
Show Gist options
  • Save igmoweb/cfa03c6abdaa5b30f2e4 to your computer and use it in GitHub Desktop.
Save igmoweb/cfa03c6abdaa5b30f2e4 to your computer and use it in GitHub Desktop.
Hook que guarda las opciones añadido
<?php
public function __construct() {
$this->id = 'hola-dolly';
$this->label = __( 'Hola Dolly', 'hola-dolly' );
// Añadir pestaña
add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
// Mostrar los campos
add_action( 'woocommerce_settings_' . $this->id, array( $this, 'output' ) );
// Guardar los cambios
add_action( 'woocommerce_settings_save_' . $this->id, array( $this, 'save' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment