'pfm', 'google' => 'gfm', 'free' => 'glfree', ]; /** * Generates the main part of the Support page. * * @since 3.2.0 */ public function display() { $this->add_data_storage(); $this->support_page(); } /** * Renders the Support page. */ private function support_page() { echo '

' . esc_html__( 'Feed Manager - Support', 'wp-product-feed-manager' ) . '

'; $this->support_content(); echo '
'; } /** * Renders the content of the Support page. */ private function support_content() { $this->getting_started_card(); $this->user_guide_card(); $this->need_support_card(); if ( 'free' === WPPFM_PLUGIN_VERSION_ID ) { // The check-in card is only for the free version $this->get_google_shopping_checklist_card(); $this->google_shopping_checklist_popup(); } $this->show_your_love_card(); $this->documentation_card(); // $this->join_our_community_card(); // Switched off until the community funnel is ready $this->join_our_facebook_group_card(); $this->request_a_feature_card(); } /** * Renders the card header of a card for the Support page. * * @param string $header_text the header of the card. */ private function card_header( $header_text ) { echo '

' . esc_html( $header_text ) . '

'; } /** * Renders the content part of a card for the Support page. * * @param string $content_html the content of the card. */ private function card_content( $content_html ) { $allowed_tags = array( 'p' => array(), 'div' => array( 'class' => array(), 'id' => array(), ), 'iframe' => array( 'src' => array(), 'class' => array(), 'target' => array(), 'id' => array(), ), 'ul' => array(), 'li' => array(), 'a' => array( 'class' => array(), 'id' => array(), 'href' => array(), 'target' => array(), ), 'input' => array( 'class' => array(), 'name' => array(), 'id' => array(), 'type' => array(), 'placeholder' => array(), ), ); echo '
' . wp_kses( $content_html, $allowed_tags ) . '
'; } /** * Renders a card icon for the Support page. * * @param $icon * * @return void */ private function card_icon( $icon = null ): void { if ( null === $icon ) { return; } echo '
Icon
'; } /** * Renders the action part of a card in the Support page. * * @param string $action_text the action text. * @param string $action_url the action url. */ private function card_action( $action_text, $action_url ) { $card_action_id = 'wppfm-' . str_replace( ' ', '-', strtolower( $action_text ) ) . '-button'; echo ''; } /** * Renders a getting started card for the Support page. */ private function getting_started_card() { $content_html = '

' . esc_html__( 'Getting started with your WooCommerce Product Feed Manager is easier than you could imagine. All our customers are not feed marketeers and we want to make your life easier.', 'wp-product-feed-manager' ) . '

'; $content_html .= '
'; $content_html .= ''; $content_html .= '
'; echo '
'; $this->card_header( esc_html__( 'Getting Started With Product Feed Manager', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); echo '
'; } /** * Renders a user guide card for the Support page. */ private function user_guide_card() { $sanitized_edd_store_url = esc_url( WPPFM_EDD_SL_STORE_URL ); $content_html = '

' . esc_html__( 'Please check the following articles to get started with your WooCommerce Product Feed Manager.', 'wp-product-feed-manager' ) . '

'; $content_html .= ''; echo '
'; $this->card_header( esc_html__( 'User Guide', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); echo '
'; } /** * Renders a Need Support card for the Support page. */ private function need_support_card() { $content_html = '

' . esc_html__( 'Our Experts would like to assist you with your query and any help you need.', 'wp-product-feed-manager' ) . '

'; echo '
'; $this->card_icon( 'support.png' ); $this->card_header( __( 'Need Expert Support?', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); $this->card_action( __( 'Contact Support', 'wp-product-feed-manager' ), WPPFM_EDD_SL_STORE_URL . 'support/?ref=' . $this->_plugin_version_mapping[WPPFM_PLUGIN_VERSION_ID] . '&utm_source=pl_sup_tab&utm_medium=textlink&utm_campaign=support_request&utm_id=PST.14225' ); echo '
'; } /** * Renders a Free Google Shopping Checklist card for the Support page. */ private function get_google_shopping_checklist_card() { $action_text = __( 'Download', 'wp-product-feed-manager' ); $content_html = ''; echo '
'; $this->card_header( __( 'Free Google Shopping Checklist', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); echo '
'; } /** * Renders a pop-up card that acknowledges the user's subscription to the Free Google Shopping Checklist. * * @since 3.11.0 */ private function google_shopping_checklist_popup() { $first_centence_html = __( 'Thank you for requesting the Google Shopping Checklist: The Complete Guide. Please check your email for the download link.', 'wp-product-feed-manager' ); $second_centence_html = __( 'If you don\'t see it in your inbox, kindly check your spam or junk folder.', 'wp-product-feed-manager' ); echo ''; } /** * Renders a Show your Love card for the Support page. */ private function show_your_love_card() { $content_html = '

' . esc_html__( 'We need your help to keep developing the plugin. Please review it and spread the love to keep us motivated.', 'wp-product-feed-manager' ) . '

'; echo '
'; $this->card_icon( 'love.png' ); $this->card_header( __( 'Show Your Love', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); $this->card_action( __( 'Leave a Review', 'wp-product-feed-manager' ), 'https://wordpress.org/support/plugin/wp-product-feed-manager/reviews/#new-post' ); echo '
'; } /** * Renders a Documentation card for the Support page. */ private function documentation_card() { $content_html = '

' . esc_html__( 'Get detailed and guided instructions to level up your feeds with the necessary setup.', 'wp-product-feed-manager' ) . '

'; echo '
'; $this->card_icon( 'documentation.png' ); $this->card_header( __( 'Documentation', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); $this->card_action( __( 'Visit Documentation', 'wp-product-feed-manager' ), WPPFM_EDD_SL_STORE_URL . 'help-center/?utm_source=pl_sup_tab&utm_medium=textlink&utm_campaign=help_center&utm_id=PST.14226' ); echo '
'; } // /** // * Renders the Join Our Community card for the Support page. // */ // private function join_our_community_card() { // $content_html = '

' . esc_html__( 'We have a strong community where we discuss ideas and help each other.', 'wp-product-feed-manager' ) . '

'; // // echo '
'; // $this->card_icon( 'community.png' ); // $this->card_header( __( 'Join Our Community', 'wp-product-feed-manager' ) ); // $this->card_content( $content_html ); // $this->card_action( __( 'Join Community', 'wp-product-feed-manager' ), 'https://www.wpproductfeedmanager.com/documentation/' ); // echo '
'; // } /** * Renders the Join Our Facebook Group card for the Support page. * * @since 3.14.0. */ private function join_our_facebook_group_card() { $content_html = '

' . esc_html__( 'Join our Facebook page for free expert marketing tips and strategies to boost your web shop sales!', 'wp-product-feed-manager' ) . '

'; echo '
'; $this->card_icon( 'facebook.png' ); $this->card_header( __( 'Join Our Facebook Page', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); $this->card_action( __( 'Join Facebook Page', 'wp-product-feed-manager' ), 'https://www.facebook.com/profile.php?id=100069788955827' ); echo '
'; } /** * Renders the Request a feature card for the Settings page. */ private function request_a_feature_card() { $content_html = '

' . esc_html__( 'If you need any feature on your WooCommerce Product Feed Manager that we currently do not have, please send us a request with your wishes and requirements.', 'wp-product-feed-manager' ) . '

'; echo '
'; $this->card_icon( 'request.png' ); $this->card_header( __( 'Request a Feature', 'wp-product-feed-manager' ) ); $this->card_content( $content_html ); $this->card_action( __( 'Request a Feature', 'wp-product-feed-manager' ), WPPFM_EDD_SL_STORE_URL . 'help-center/feature-request/?utm_source=pl_sup_tab&utm_medium=textlink&utm_campaign=feature_request&utm_id=PST.14227' ); echo '
'; } /** * Stores data in the DOM for the Feed Manager Settings page * * @since 3.11.0 - Added the first-name and last-name data. */ private function add_data_storage() { $current_user = wp_get_current_user(); echo '
'; } } // end of WPPFM_Support_Page class endif;