add_data_storage(); $this->settings_page(); } /** * Renders the Settings page. */ private function settings_page() { echo '

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

'; $this->settings_content(); echo '
'; } /** * Renders the content of the Settings page. * * @since 1.5.0 * @since 1.7.0 Added the backups table. * @since 1.8.0 Added the third party attributes text field. * @since 1.9.0 Added the Re-initialize button. * @since 2.3.0 Added the Notice option. * @since 2.10.0 Added the show product identifiers option. * @since 2.15.0 Added the wpml full resolution url option. * @since 3.2.0 Moved the Clear feed process button two steps up to prevent unintended clicking of the Re-initiate plugin button. */ private function settings_content() { $auto_fix_feed_option = get_option( 'wppfm_auto_feed_fix', false ); $auto_feed_fix_checked = true === $auto_fix_feed_option || 'true' === $auto_fix_feed_option ? ' checked ' : ''; $background_processing_option = get_option( 'wppfm_disabled_background_mode', 'false' ); $background_processing_unchecked = true === $background_processing_option || 'true' === $background_processing_option ? ' checked ' : ''; $process_logging_option = get_option( 'wppfm_process_logger_status', 'false' ); $process_logging_unchecked = true === $process_logging_option || 'true' === $process_logging_option ? ' checked ' : ''; $product_identifiers_option = get_option( 'wppfm_show_product_identifiers', 'false' ); $show_product_identifiers = true === $product_identifiers_option || 'true' === $product_identifiers_option ? ' checked ' : ''; $manual_channel_update_option = get_option( 'wppfm_manual_channel_update', 'false' ); $manual_channel_update = true === $manual_channel_update_option || 'true' === $manual_channel_update_option ? ' checked ' : ''; $use_full_resolution_option = get_option( 'wppfm_use_full_url_resolution', 'false' ); $wpml_use_full_resolution_urls = true === $use_full_resolution_option || 'true' === $use_full_resolution_option ? ' checked ' : ''; $omit_price_filters_option = get_option( 'wppfm_omit_price_filters', 'false' ); $omit_price_filters = true === $omit_price_filters_option || 'true' === $omit_price_filters_option ? ' checked ' : ''; $third_party_attribute_keywords = get_option( 'wppfm_third_party_attribute_keywords', '%wpmr%,%cpf%,%unit%,%bto%,%yoast%' ); $notice_mailaddress = get_option( 'wppfm_notice_mailaddress' ) ? get_option( 'wppfm_notice_mailaddress' ) : get_bloginfo( 'admin_email' ); echo ' ' . esc_html__( 'Auto feed fix', 'wp-product-feed-manager' ) . '

' . esc_html__( 'Leaving this option on can put extra strain on your server when feeds keep failing.', 'wp-product-feed-manager' ) . '

'; echo ' ' . esc_html__( 'Disable background processing', 'wp-product-feed-manager' ) . '

' . esc_html__( 'WARNING: When this option is selected the system can only update one feed at a time. Make sure to de-conflict your feeds auto-update schedules to prevent more than one feed auto-updates at a time.', 'wp-product-feed-manager' ) . '

'; echo ' ' . esc_html__( 'Feed process logger', 'wp-product-feed-manager' ) . '

' . esc_html__( 'Switch this option only on request of the help desk. ', 'wp-product-feed-manager' ) . '

'; // @since 2.10.0. // @since 3.14.0 - Only allows the product identifiers option for the WP Marketing Robot plugin. if ( 'wpmarketingrobot' === WPPFM_PLUGIN_DISTRIBUTOR ) { echo ' ' . esc_html__( 'Show product identifiers', 'wp-product-feed-manager' ) . '

' . esc_html__( 'This option will add product identifier input fields to the Inventory card of your products. The MPN identifier is also added to the product variations.', 'wp-product-feed-manager' ) . '

'; } // @since 2.15.0. if ( has_filter( 'wppfm_get_wpml_permalink' ) ) { echo ' ' . esc_html__('WPML: Use full resolution URLs', 'wp-product-feed-manager') . '

' . esc_html__('Use this option if you\'re using WPML and are getting incorrect URLs in your feed. This option will slightly increase the load on the database when processing a feed.', 'wp-product-feed-manager') . '

'; } // @since 3.12.0. echo ' ' . esc_html__( 'Omit price filters', 'wp-product-feed-manager' ) . '

' . esc_html__( 'Enable this option to prevent third-party plugins or custom filters from altering the prices in your product feeds. Use this if you notice incorrect prices in your feed.', 'wp-product-feed-manager' ) . '

'; // @since 3.7.0. if ( 'full' === WPPFM_PLUGIN_VERSION_ID ) { echo ' ' . esc_html__( 'Manual channel update', 'wp-product-feed-manager' ) . '

' . esc_html__( 'By default your channels are updated automatically as soon as an update is available. This option allows your to switch off the automatic channel updates and keep your channels manually up to date.', 'wp-product-feed-manager' ) . '

'; } echo ' ' . esc_html__( 'Clear feed process', 'wp-product-feed-manager' ) . '
' . esc_html__( 'Clear Feed Process', 'wp-product-feed-manager' ) . '
'; echo ' ' . esc_html__( 'Third party attributes', 'wp-product-feed-manager' ) . '

' . esc_html__('Use specific wildcards. Do not use to broad wildcards like %_% because that will include default WooCommerce attributes and can sometimes result in incorrect feed outputs.', 'wp-product-feed-manager') . '

'; echo ' ' . esc_html__( 'Notice recipient', 'wp-product-feed-manager' ) . '

' . esc_html__('Enter the email address of the person you want to be notified when a feed fails during an automatic feed update. This option requires an SMTP server for WordPress to be installed on your server. If no emails are received, consider using an SMTP plugin to improve email delivery.', 'wp-product-feed-manager') . '

'; echo ' ' . esc_html__( 'Re-initialize', 'wp-product-feed-manager' ) . '
' . esc_html__( 'Re-initiate Plugin', 'wp-product-feed-manager' ) . '

' . esc_html__('Updates and cleans the tables if required, re-initiates the cron events and resets the stored license - does not delete your current feeds or settings. You need to re-enter your license after this action.', 'wp-product-feed-manager') . '

'; echo ' ' . esc_html__( 'Backups', 'wp-product-feed-manager' ) . ' '; echo '
' . esc_html__( 'File Name', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'Backup Date', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'Actions', 'wp-product-feed-manager' ) . '
'; echo '
' . esc_html__( 'Add New Backup', 'wp-product-feed-manager' ) . '
  ' . esc_html__( 'Backup current feeds', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'Cancel backup', 'wp-product-feed-manager' ) . ''; echo ''; } /** * Stores data in the DOM for the Feed Manager Settings page */ private function add_data_storage() { echo '
'; } } // end of WPPFM_Settings_Page class endif;