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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / includes / admin / views / html-admin-settings.php
woocommerce / includes / admin / views Last commit date
html-admin-dashboard-setup.php 5 months ago html-admin-page-addons-category-nav.php 4 years ago html-admin-page-product-export.php 1 year ago html-admin-page-reports.php 2 years ago html-admin-page-status-logs-db.php 2 years ago html-admin-page-status-logs.php 2 years ago html-admin-page-status-report.php 4 weeks ago html-admin-page-status-tools.php 2 years ago html-admin-page-status.php 8 years ago html-admin-settings.php 4 weeks ago html-bulk-edit-product.php 1 year ago html-email-template-preview.php 1 year ago html-notice-base-table-missing.php 3 years ago html-notice-custom.php 8 years ago html-notice-download-dir-sync-complete.php 2 years ago html-notice-install.php 5 years ago html-notice-legacy-shipping.php 11 months ago html-notice-maxmind-license-key.php 6 years ago html-notice-no-shipping-methods.php 2 years ago html-notice-redirect-only-download.php 4 years ago html-notice-regenerating-lookup-table.php 5 years ago html-notice-regenerating-thumbnails.php 8 years ago html-notice-secure-connection.php 2 years ago html-notice-sync-on-read-disabled.php 3 months ago html-notice-template-check.php 2 years ago html-notice-update.php 4 months ago html-notice-updated.php 7 years ago html-notice-updating.php 6 years ago html-notice-uploads-directory-is-unprotected.php 2 years ago html-notice-wp-php-minimum-requirements.php 2 years ago html-quick-edit-product.php 1 year ago html-report-by-date.php 5 years ago
html-admin-settings.php
191 lines
1 <?php
2 /**
3 * Admin View: Settings
4 *
5 * This file is included in WC_Admin_Settings::output().
6 *
7 * @package WooCommerce
8 */
9
10 // phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment
11
12 use Automattic\WooCommerce\Admin\Features\Features;
13 use Automattic\WooCommerce\Admin\Settings\SettingsUIPageInterface;
14 use Automattic\WooCommerce\Utilities\FeaturesUtil;
15
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit;
18 }
19
20 /**
21 * The current WC admin settings tab ID.
22 *
23 * @var string $current_tab
24 */
25
26 /**
27 * The current WC admin settings section ID.
28 *
29 * @var string $current_section
30 */
31
32 $tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'woocommerce_sections_' . $current_tab ) || has_action( 'woocommerce_settings_' . $current_tab ) || has_action( 'woocommerce_settings_tabs_' . $current_tab );
33 $current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : '';
34
35 if ( ! $tab_exists ) {
36 wp_safe_redirect( admin_url( 'admin.php?page=wc-settings' ) );
37 exit;
38 }
39
40 $hide_nav = 'checkout' === $current_tab && in_array( $current_section, array( 'offline', 'bacs', 'cheque', 'cod' ), true );
41 $is_settings_ui_page = false;
42 $settings_ui_settings_page = null;
43
44 if ( Features::is_enabled( 'settings-ui' ) ) {
45 foreach ( WC_Admin_Settings::get_settings_pages() as $settings_page ) {
46 if ( ! $settings_page instanceof WC_Settings_Page || $settings_page->get_id() !== $current_tab ) {
47 continue;
48 }
49
50 $is_settings_ui_page = $settings_page->get_settings_ui_page() instanceof SettingsUIPageInterface;
51 $settings_ui_settings_page = $is_settings_ui_page ? $settings_page : null;
52 break;
53 }
54 }
55
56 if ( $settings_ui_settings_page instanceof WC_Settings_Page ) {
57 remove_action( 'woocommerce_sections_' . $current_tab, array( $settings_ui_settings_page, 'output_sections' ) );
58 }
59
60 // Move 'Advanced' to the last.
61 if ( array_key_exists( 'advanced', $tabs ) ) {
62 $advanced = $tabs['advanced'];
63 unset( $tabs['advanced'] );
64 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
65 $tabs['advanced'] = $advanced;
66 }
67
68 $marketplace_base_url = trailingslashit(
69 esc_url_raw( apply_filters( 'woo_com_base_url', 'https://woocommerce.com/' ) )
70 ) . 'product-category/woocommerce-extensions/';
71
72 $marketplace_links = array(
73 'products' => array(
74 'url' => $marketplace_base_url . 'merchandising/',
75 'is_external' => true,
76 /* translators: %1$s: opening link tag, %2$s: closing link tag */
77 'message' => __( '%1$sExplore solutions%2$s that help highlight products and drive more sales.', 'woocommerce' ),
78 ),
79 'tax' => array(
80 'url' => $marketplace_base_url . 'operations/sales-tax-and-duties/',
81 'is_external' => true,
82 /* translators: %1$s: opening link tag, %2$s: closing link tag */
83 'message' => __( '%1$sExplore solutions%2$s that help with tax calculations, compliance, and regional requirements.', 'woocommerce' ),
84 ),
85 'shipping' => array(
86 'url' => $marketplace_base_url . 'shipping-delivery-and-fulfillment/',
87 'is_external' => true,
88 /* translators: %1$s: opening link tag, %2$s: closing link tag */
89 'message' => __( '%1$sExplore solutions%2$s that enhance shipping, delivery, and fulfillment workflows.', 'woocommerce' ),
90 ),
91 'account' => array(
92 'url' => $marketplace_base_url . 'store-content-and-customizations/cart-and-checkout-features/',
93 'is_external' => true,
94 /* translators: %1$s: opening link tag, %2$s: closing link tag */
95 'message' => __( '%1$sExplore solutions%2$s that help customize cart and checkout flows.', 'woocommerce' ),
96 ),
97 'email' => array(
98 'url' => $marketplace_base_url . 'marketing-extensions/email-marketing-extensions/',
99 'is_external' => true,
100 /* translators: %1$s: opening link tag, %2$s: closing link tag */
101 'message' => __( '%1$sExplore solutions%2$s that help automate and improve customer email communication.', 'woocommerce' ),
102 ),
103 'general' => array(
104 'url' => admin_url( 'admin.php?page=wc-admin&path=%2Fextensions' ),
105 'is_external' => false,
106 /* translators: %1$s: opening link tag, %2$s: closing link tag */
107 'message' => __( '%1$sDiscover additional solutions%2$s to boost your business and expand what your store can do.', 'woocommerce' ),
108 ),
109 );
110
111 ?>
112
113 <div class="wrap woocommerce">
114 <?php do_action( 'woocommerce_before_settings_' . $current_tab ); ?>
115 <form method="<?php echo esc_attr( apply_filters( 'woocommerce_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data">
116 <?php if ( ! $hide_nav ) : ?>
117 <nav class="nav-tab-wrapper woo-nav-tab-wrapper">
118 <?php
119
120 foreach ( $tabs as $slug => $label ) {
121 echo '<a href="' . esc_html( admin_url( 'admin.php?page=wc-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
122 }
123
124 /**
125 * Hook for adding additional settings tabs.
126 *
127 * @since 1.0.0
128 */
129 do_action( 'woocommerce_settings_tabs' );
130
131 ?>
132 </nav>
133 <?php endif; ?>
134 <h1 class="screen-reader-text"><?php echo esc_html( $current_tab_label ); ?></h1>
135 <?php
136 do_action( 'woocommerce_sections_' . $current_tab );
137
138 WC_Admin_Settings::show_messages();
139
140 do_action( 'woocommerce_settings_' . $current_tab );
141 do_action( 'woocommerce_settings_tabs_' . $current_tab );
142 ?>
143 <p class="submit">
144 <?php if ( empty( $GLOBALS['hide_save_button'] ) ) : ?>
145 <button name="save" disabled class="woocommerce-save-button components-button is-primary" type="submit" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
146 <?php endif; ?>
147 <?php wp_nonce_field( 'woocommerce-settings' ); ?>
148 </p>
149 <?php if ( isset( $marketplace_links[ $current_tab ] ) ) : ?>
150 <?php
151 $link_config = $marketplace_links[ $current_tab ];
152
153 if ( $link_config['is_external'] ) {
154 $utm_source = 'settings_' . $current_tab . ( $current_section ? '_' . $current_section : '' );
155 $link_url = add_query_arg( 'utm_source', $utm_source, $link_config['url'] );
156 $icon_url = WC()->plugin_url() . '/assets/images/icons/external-link.svg';
157 $external_icon = '<img src="' . esc_url( $icon_url ) . '" alt="" />';
158 $screen_reader = '<span class="screen-reader-text">' . esc_html__( '(opens in a new tab)', 'woocommerce' ) . '</span>';
159 $link_open = '<a href="' . esc_url( $link_url ) . '" target="_blank" rel="noopener noreferrer">' . $external_icon;
160 $link_close = $screen_reader . '</a>';
161 } else {
162 $link_open = '<a href="' . esc_url( $link_config['url'] ) . '">';
163 $link_close = '</a>';
164 }
165 ?>
166 <p class="wc-settings-marketplace-link" data-settings-tab="<?php echo esc_attr( $current_tab ); ?>"<?php echo $current_section ? ' data-settings-section="' . esc_attr( $current_section ) . '"' : ''; ?>>
167 <?php
168 echo wp_kses(
169 sprintf( $link_config['message'], $link_open, $link_close ),
170 array(
171 'a' => array(
172 'href' => array(),
173 'target' => array(),
174 'rel' => array(),
175 ),
176 'img' => array(
177 'src' => array(),
178 'alt' => array(),
179 ),
180 'span' => array(
181 'class' => array(),
182 ),
183 )
184 );
185 ?>
186 </p>
187 <?php endif; ?>
188 </form>
189 <?php do_action( 'woocommerce_after_settings_' . $current_tab ); ?>
190 </div>
191