get_id() . '_settings', $this->get_settings(), $this ); if ( empty( $settings ) ) { return; } $connection_handler = facebook_for_woocommerce()->get_connection_handler(); $is_connected = $connection_handler->is_connected(); ?> has_previously_connected_fbe_1() && $this->get_disconnected_message() ) : ?>

get_disconnected_message() ); ?>

get_id() . '_settings' ); ?> get_id() . '_settings' ); ?> maybe_render_learn_more_link( $this->get_label() ); ?>
documentation_url ) : ?> get_settings() ); } /** * Determines whether the current screen is the same as identified by the current class. * * @since 2.2.0 * * @return bool */ protected function is_current_screen_page() { if ( Settings::PAGE_ID !== Helper::get_requested_value( 'page' ) ) { return false; } // assume we are on the Connection tab by default because the link under Marketing doesn't include the tab query arg $connection_handler = facebook_for_woocommerce()->get_connection_handler(); $use_enhanced_onboarding = facebook_for_woocommerce()->use_enhanced_onboarding(); $default_tab = $use_enhanced_onboarding ? 'shops' : ( $connection_handler->is_connected() ? 'advertise' : 'connection' ); $tab = Helper::get_requested_value( 'tab', $default_tab ); return ! empty( $tab ) && $tab === $this->get_id(); } /** Getter methods ************************************************************************************************/ /** * Gets the settings. * * Should return a multi-dimensional array of settings in the format expected by \WC_Admin_Settings * * @return array */ abstract public function get_settings(): array; /** * Gets the message to display when the plugin is disconnected. * * @since 2.0.0 * * @return string */ public function get_disconnected_message() { return ''; } /** * Gets the screen ID. * * @since 2.0.0 * * @return string */ public function get_id() { return $this->id; } /** * Gets the screen label. * * @since 2.0.0 * * @return string */ public function get_label() { /** * Filters the screen label. * * @since 2.0.0 * * @param string $label screen label, for display */ return (string) apply_filters( 'wc_facebook_admin_settings_' . $this->get_id() . '_screen_label', $this->label, $this ); } /** * Gets the screen title. * * @since 2.0.0 * * @return string */ public function get_title() { /** * Filters the screen title. * * @since 2.0.0 * * @param string $title screen title, for display */ return (string) apply_filters( 'wc_facebook_admin_settings_' . $this->get_id() . '_screen_title', $this->title, $this ); } /** * Gets the screen description. * * @since 2.0.0 * * @return string */ public function get_description() { /** * Filters the screen description. * * @since 2.0.0 * * @param string $description screen description, for display */ return (string) apply_filters( 'wc_facebook_admin_settings_' . $this->get_id() . '_screen_description', $this->description, $this ); } }