bigcommerce / bigcommerce-for-wordpress

A headless commerce integration for WordPress, powered by BigCommerce
https://www.bigcommerce.com/wordpress/
GNU General Public License v2.0
110 stars 48 forks source link

Categories Syncs Are Not Cleaned Up and Product Category Assignments Updated From Correct Channel #464

Open bc-erich opened 2 months ago

bc-erich commented 2 months ago

Expected behavior

If the Wordpress storefront channel has its own category tree and categories, then the Wordpress plugin should only source the categories from the connected channel and keep the assigned categories in sync. Any categories that are no longer within the tree should be removed from Wordpress, any new categories that are added should be synced over, and product category assignments should be updated.

Actual behavior

The Wordpress channel has its own category tree and categories assigned yet categories assigned to the BigCommerce default storefront and other channels are synced over and remain in Wordpress. Products continue to be assigned to the default storefront's category instead of the categories associated with the channel

Steps to reproduce behavior

  1. Connect Wordpress instance to fresh BigCommerce trial
  2. Select "Yes, automatically list new BigCommerce products on this channel"
  3. Select Full - Import and store all product data in WP database (default)
  4. Disable webhooks
  5. The plugin should sync the categories and products from the store successfully
  6. Login to the BigCommerce Control panel and update to the new Category Manager Experience, which allows you to manage categories across multiple storefronts
  7. Create a category tree under the Wordpress channel and create a new category
  8. Pick one of the products and assign it to the newly created category under the Wordpress channel
  9. Go into Wordpress and resync
  10. Note that the new category was not brought over during the sync, the product's category assignment has not updated, and the categories from the default channel still existing in the plugin despite the channel now having its own category tree and categories

Screenshot/Video (if applicable)

Example Image

Workaround or possible solution