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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 / helper / class-wc-helper-admin.php
woocommerce / includes / admin / helper Last commit date
views 5 months ago class-wc-helper-admin.php 4 months ago class-wc-helper-api.php 1 year ago class-wc-helper-compat.php 5 years ago class-wc-helper-options.php 3 years ago class-wc-helper-orders-api.php 2 years ago class-wc-helper-sanitization.php 1 year ago class-wc-helper-subscriptions-api.php 4 months ago class-wc-helper-updater.php 2 months ago class-wc-helper.php 4 months ago class-wc-plugin-api-updater.php 1 year ago class-wc-product-usage-notice.php 1 year ago class-wc-woo-helper-connection.php 4 months ago class-wc-woo-update-manager-plugin.php 2 years ago
class-wc-helper-admin.php
302 lines
1 <?php
2 /**
3 * WooCommerce Admin Helper - React admin interface
4 *
5 * @package WooCommerce\Admin\Helper
6 */
7
8 use Automattic\WooCommerce\Internal\Admin\Marketplace;
9 use Automattic\WooCommerce\Admin\PluginsHelper;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * WC_Helper Class
17 *
18 * The main entry-point for all things related to the Helper.
19 * The Helper manages the connection between the store and
20 * an account on WooCommerce.com.
21 */
22 class WC_Helper_Admin {
23 /**
24 * Clear cache tool identifier.
25 */
26 const CACHE_TOOL_ID = 'clear_woocommerce_helper_cache';
27
28 /**
29 * Loads the class, runs on init
30 *
31 * @return void
32 */
33 public static function load() {
34 if ( is_admin() ) {
35 $is_wc_home_or_in_app_marketplace = (
36 isset( $_GET['page'] ) && 'wc-admin' === $_GET['page'] //phpcs:ignore WordPress.Security.NonceVerification.Recommended
37 );
38
39 if ( $is_wc_home_or_in_app_marketplace ) {
40 add_filter( 'woocommerce_admin_shared_settings', array( __CLASS__, 'add_marketplace_settings' ) );
41 }
42
43 add_filter( 'woocommerce_debug_tools', array( __CLASS__, 'register_cache_clear_tool' ) );
44 }
45
46 add_filter( 'rest_api_init', array( __CLASS__, 'register_rest_routes' ) );
47 }
48
49 /**
50 * Pushes settings onto the WooCommerce Admin global settings object (wcSettings).
51 *
52 * @param mixed $settings The settings object we're amending.
53 *
54 * @return mixed $settings
55 */
56 public static function add_marketplace_settings( $settings ) {
57 if ( ! WC_Helper::is_site_connected() && isset( $_GET['connect'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
58 wp_safe_redirect( self::get_connection_url() );
59 exit;
60 }
61
62 $auth_user_data = WC_Helper_Options::get( 'auth_user_data', array() );
63 $auth_user_email = isset( $auth_user_data['email'] ) ? $auth_user_data['email'] : '';
64
65 // Get the all installed themes and plugins. Knowing this will help us decide to show Add to Store button on product cards.
66 $installed_products = array_merge( WC_Helper::get_local_plugins(), WC_Helper::get_local_themes() );
67 $installed_products = array_map(
68 function ( $product ) {
69 return $product['slug'];
70 },
71 $installed_products
72 );
73
74 $blog_name = get_bloginfo( 'name' );
75
76 $settings['wccomHelper'] = array(
77 'isConnected' => WC_Helper::is_site_connected(),
78 'connectURL' => self::get_connection_url(),
79 'reConnectURL' => self::get_connection_url( true ),
80 'userEmail' => $auth_user_email,
81 'userAvatar' => get_avatar_url( $auth_user_email, array( 'size' => '48' ) ),
82 'storeCountry' => wc_get_base_location()['country'],
83 'storeName' => $blog_name ? $blog_name : '',
84 'inAppPurchaseURLParams' => WC_Admin_Addons::get_in_app_purchase_url_params(),
85 'installedProducts' => $installed_products,
86 'mySubscriptionsTabLoaded' => WC_Helper_Options::get( 'my_subscriptions_tab_loaded' ),
87 'wooUpdateManagerInstalled' => WC_Woo_Update_Manager_Plugin::is_plugin_installed(),
88 'wooUpdateManagerActive' => WC_Woo_Update_Manager_Plugin::is_plugin_active(),
89 'wooUpdateManagerInstallUrl' => WC_Woo_Update_Manager_Plugin::generate_install_url(),
90 'wooUpdateManagerPluginSlug' => WC_Woo_Update_Manager_Plugin::WOO_UPDATE_MANAGER_SLUG,
91 'dismissNoticeNonce' => wp_create_nonce( 'dismiss_notice' ),
92 'trackingAllowed' => 'yes' === get_option( 'woocommerce_allow_tracking' ),
93 );
94
95 // This data is only used in the `Extensions` screen, so only populate it there.
96 // More specifically, it's used in `My Subscriptions`, however, switching tabs doesn't require
97 // a page reload, so we just check for `path` (/extensions), rather than `tab` (my-subscriptions).
98 if ( ! empty( $_GET['path'] ) && '/extensions' === $_GET['path'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
99 $settings['wccomHelper']['wooUpdateCount'] = WC_Helper_Updater::get_updates_count_based_on_site_status();
100 $settings['wccomHelper']['connected_notice'] = PluginsHelper::get_wccom_connected_notice( $auth_user_email );
101 $settings['wccomHelper']['woocomConnectNoticeType'] = WC_Helper_Updater::get_woo_connect_notice_type();
102
103 if ( WC_Helper::is_site_connected() ) {
104 $settings['wccomHelper']['subscription_expired_notice'] = PluginsHelper::get_expired_subscription_notice( false );
105 $settings['wccomHelper']['subscription_expiring_notice'] = PluginsHelper::get_expiring_subscription_notice( false );
106 $settings['wccomHelper']['subscription_missing_notice'] = PluginsHelper::get_missing_subscription_notice();
107 $settings['wccomHelper']['connection_url_notice'] = WC_Woo_Helper_Connection::get_connection_url_notice();
108 $settings['wccomHelper']['has_host_plan_orders'] = WC_Woo_Helper_Connection::has_host_plan_orders();
109 $settings['wccomHelper']['maybe_deleted_connection'] = WC_Woo_Helper_Connection::get_deleted_connection_notice();
110 } else {
111 $settings['wccomHelper']['disconnected_notice'] = PluginsHelper::get_wccom_disconnected_notice();
112 }
113 }
114
115 return $settings;
116 }
117
118 /**
119 * Generates the URL for connecting or disconnecting the store to/from WooCommerce.com.
120 * Approach taken from existing helper code that isn't exposed.
121 *
122 * @param bool $reconnect indicate if the site is being reconnected.
123 *
124 * @return string
125 */
126 public static function get_connection_url( $reconnect = false ) {
127 // Default to wc-addons, although this can be changed from the frontend
128 // in the function `connectUrl()` within marketplace functions.tsx.
129 $connect_url_args = array(
130 'page' => 'wc-addons',
131 'section' => 'helper',
132 );
133
134 // No active connection.
135 if ( WC_Helper::is_site_connected() && ! $reconnect ) {
136 $connect_url_args['wc-helper-disconnect'] = 1;
137 $connect_url_args['wc-helper-nonce'] = wp_create_nonce( 'disconnect' );
138 } else {
139 $connect_url_args['wc-helper-connect'] = 1;
140 $connect_url_args['wc-helper-nonce'] = wp_create_nonce( 'connect' );
141 }
142
143 if ( ! empty( $_GET['utm_source'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
144 $connect_url_args['utm_source'] = wc_clean( wp_unslash( $_GET['utm_source'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
145 }
146
147 if ( ! empty( $_GET['utm_campaign'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
148 $connect_url_args['utm_campaign'] = wc_clean( wp_unslash( $_GET['utm_campaign'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
149 }
150
151 return add_query_arg(
152 $connect_url_args,
153 admin_url( 'admin.php' )
154 );
155 }
156
157 /**
158 * Registers the REST routes for the featured products and product
159 * previews endpoints.
160 */
161 public static function register_rest_routes() {
162 /* Used by the WooCommerce > Extensions > Discover page. */
163 register_rest_route(
164 'wc/v3',
165 '/marketplace/featured',
166 array(
167 'methods' => 'GET',
168 'callback' => array( __CLASS__, 'get_featured' ),
169 'permission_callback' => array( __CLASS__, 'get_permission' ),
170 )
171 );
172
173 /* Used to show previews of products in a modal in in-app marketplace. */
174 register_rest_route(
175 'wc/v1',
176 '/marketplace/product-preview',
177 array(
178 'methods' => 'GET',
179 'callback' => array( __CLASS__, 'get_product_preview' ),
180 'permission_callback' => array( __CLASS__, 'get_permission' ),
181 )
182 );
183 }
184
185 /**
186 * The Extensions page can only be accessed by users with the manage_woocommerce
187 * capability. So the API mimics that behavior.
188 */
189 public static function get_permission() {
190 return current_user_can( 'manage_woocommerce' );
191 }
192
193 /**
194 * Fetch featured products from WooCommerce.com and serve them
195 * as JSON.
196 */
197 public static function get_featured() {
198 $featured = WC_Admin_Addons::fetch_featured();
199
200 if ( is_wp_error( $featured ) ) {
201 wp_send_json_error( array( 'message' => $featured->get_error_message() ) );
202 }
203
204 wp_send_json( $featured );
205 }
206
207 /**
208 * Fetch data for product previews from WooCommerce.com.
209 *
210 * @param WP_REST_Request $request Request object.
211 */
212 public static function get_product_preview( $request ) {
213 $product_id = (int) $request->get_param( 'product_id' );
214
215 if ( ! $product_id ) {
216 wp_send_json_error(
217 array(
218 'message' => __( 'Missing product ID', 'woocommerce' ),
219 ),
220 400
221 );
222 }
223
224 $product_preview = WC_Admin_Addons::fetch_product_preview( $product_id );
225
226 if ( ! $product_preview ) {
227 wp_send_json_error(
228 array(
229 'message' => __( 'We couldn\'t find a preview for this product.', 'woocommerce' ),
230 ),
231 404
232 );
233 }
234
235 if ( is_wp_error( $product_preview ) ) {
236 wp_send_json_error(
237 array(
238 'message' => $product_preview->get_error_message(),
239 )
240 );
241 }
242
243 if (
244 ! isset( $product_preview['css'] )
245 || ! is_string( $product_preview['css'] )
246 || ! isset( $product_preview['html'] )
247 || ! is_string( $product_preview['html'] )
248 ) {
249 wp_send_json_error(
250 array(
251 'message' => __(
252 'API response is missing required elements, or they are in the wrong form.',
253 'woocommerce'
254 ),
255 ),
256 500
257 );
258 }
259
260 $sanitized_product_preview = array(
261 'css' => WC_Helper_Sanitization::sanitize_css( $product_preview['css'] ),
262 'html' => WC_Helper_Sanitization::sanitize_html( $product_preview['html'] ),
263 );
264
265 wp_send_json( $sanitized_product_preview );
266 }
267
268 /**
269 * Register the cache clearing tool on the WooCommerce > Status > Tools page.
270 *
271 * @param array $debug_tools Available debug tool registrations.
272 * @return array Filtered debug tool registrations.
273 */
274 public static function register_cache_clear_tool( $debug_tools ) {
275 $debug_tools[ self::CACHE_TOOL_ID ] = array(
276 'name' => __( 'Clear WooCommerce.com cache', 'woocommerce' ),
277 'button' => __( 'Clear', 'woocommerce' ),
278 'desc' => sprintf(
279 __( 'This tool will empty the WooCommerce.com data cache, used in WooCommerce Extensions.', 'woocommerce' ),
280 ),
281 'callback' => array( __CLASS__, 'run_clear_cache_tool' ),
282 );
283
284 return $debug_tools;
285 }
286
287
288 /**
289 * "Clear" helper cache by invalidating it.
290 */
291 public static function run_clear_cache_tool() {
292 WC_Helper::_flush_subscriptions_cache();
293 WC_Helper::flush_product_usage_notice_rules_cache();
294 WC_Helper::flush_connection_data_cache();
295 WC_Helper_Updater::flush_updates_cache();
296
297 return __( 'Helper cache cleared.', 'woocommerce' );
298 }
299 }
300
301 WC_Helper_Admin::load();
302