id = self::$plugin_info['name'] . '-advanced-product-pricing-main-settings'; } /** * Set Fields. * * @return void */ protected function set_fields() { $this->fields = main_fields( $this, self::$core, self::$plugin_info ); $this->tab_key = 'action'; } /** * Settings Hooks. * * @return void */ protected function hooks() { add_action( $this->id . '-just-after-settings-field-swatch_template', array( $this, 'swatch_template_preview' ), 100, 1 ); } /** * Swatch Template Preview * * @param array $field * @return void */ public function swatch_template_preview( $field ) { $swatch_template = $this->get_settings( 'swatch_template' ); $template_url_base = self::$plugin_info['url'] . 'assets/images/template-'; $template_url = $template_url_base . $swatch_template . '.png'; ?>