-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
This epic aims to organize the work for cleaning up obsolete bits and pieces in the Bridge and help us better manage our features and tweaks into multiple site plans.
The workstream will span into three phases:
- Cleaning up the "store-on-wpcom" project
- Cleaning up the "ecommerce" project
- Implementing a plans-router controller for feature gating
Phase 1: Cleaning up the "store-on-wpcom" project
Given that this codebase is currently running live, it would be best to take a step back and carefully assess this cleanup in small parts.
Removals that are already taken care of elsewhere and were clearly obsolete
Here's the list of the cleanup RPs:
- Remove woocommerce_show_admin_notice filter #886
- Remove store link from masterbar #887
- Remove paypal method supports api fix #888
- Remove allowed redirect hosts fix #889
- Remove jetpack sync whitelist options #890
Relatively straightforward removals
Here's the list of the cleanup RPs:
- Remove store link from masterbar #887
Seems straightforward—there is no "Store" link or URL. - Remove stripe notices handler #891
Seems straightforward—no need to handle Stripe's stuff. - Remove sf-guided-tour css, JS, and wc logo #892
Seems straightforward—The JS file is not loaded. - Remove mailchimps redirection fix #893
Seems straightforward—we don't include MailChimp as a bundled extension in our plans.
Features to consider adding to all plans
Two features only run on Business sites, and adding them to all plans seems reasonable.
1. Cleaning up the MailChimp queues and abandoned carts in the DB
Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-mailchimp-deactivate-hook.php
This fix cleans up MailChimp queue tables after the plugin gets deactivated.
It is a defensive action to reduce DB bloat--It may make sense to keep it.
Thoughts?
2. Handling the DB auto-update feature
Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-enable-auto-update-db.php
We enable DB auto updates on Business sites. There is no similar filter for Ecommerce sites.
Should we keep this feature and allow it for all plans?
Removals that require attention
These five features seemed to be the only ones that looked interesting. Please note that all are currently running on Business sites with WooCommerce installed.
Here's the list of features for discussion:
1. Existing REST API routes
Ref code: https://github.com/Automattic/wc-calypso-bridge/tree/master/store-on-wpcom/api
We expose the following REST endpoints:
/wc/v3/data/counts
/wc/v3/mailchimp/(sync|api_key|store_info|campaign_defaults|newsletter_setting)
/wc/v3/products/calypso-reviews
/wc/v3/orders/<id>/send_invoice
/wc/v3/settings_email_groups
Is this removal safe? Is there a chance of using any of them elsewhere?
2. Fixing the REST API payment gateways' defaults
There are a few fixes for the default values of the payment gateways' settings. It seems like an obsolete feature related to the "store-on-wpcom" project. Thoughts? My best guess is that these aim to fix a pristine DB state to, e.g., return enabled=>'no'
instead of enabled=>''
, to help with JS application states. Note that there are no similar fixes in the Ecommerce plan currently. Should we remove it?
Ref code #1 for BACS, Ref code #2 for Cheques, Ref code #3 for Paypal
3. Handling the _created_via meta for products
Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-products.php
This feature adds the _created_via
tracking meta in the product creation flow, but it only handles the calypso
value ref when the URL contains the &_via_calypso
param. Note that WC core only uses the _created_via
meta on Orders.
Should we remove this?
4. Handling Jetpack sync in WC-related REST requests
Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-jetpack-hotfixes.php
Another feature that runs on Business sites. It disables jetpack sync during rest requests to avoid lengthly (> 5 seconds) response times during the shutdown action for things like product creation.
- See also https://core.trac.wordpress.org/ticket/41358#ticket
- See also Sync: Add Async Sender jetpack#7482
Looking at the ref issues, there isn't a clear outcome on what we should do here. Should we keep it? This hasn't been an issue for Ecommerce sites, or is it?
5. Handling Jetpack's publicize feature in products
Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-disable-publicize.php
This fix aims to disable the Publicize tool for products. What's the status of this tool? Is it deprecated/renamed? Should we consider handling the product exclusion here in all plans?
Note: Publicize is now called “auto-sharing” and is a feature of Jetpack Social.
Phase 2: Cleaning up the "ecommerce" project
TBA
Phase 3: Implementing a plans-router controller for feature gating
TBA