<?php if (!defined('ABSPATH')) { exit; } abstract class WC_Integration extends WC_Settings_API { public $enabled = 'yes'; public $method_title = ''; public $method_description = ''; public function get_method_title() { return apply_filters('woocommerce_integration_title', $this->method_title, $this); } public function get_method_description() { return apply_filters('woocommerce_integration_description', $this->method_description, $this); } public function admin_options() { echo '<h2>' . esc_html($this->get_method_title()) . '</h2>'; echo wp_kses_post(wpautop($this->get_method_description())); echo '<div><input type="hidden" name="section" value="' . esc_attr($this->id) . '" /></div>'; parent::admin_options(); } public function init_settings() { parent::init_settings(); $this->enabled = !empty($this->settings['enabled']) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no'; } }