• wrip

    (@wrip)


    I am thinking of splitting the current website to improve performance. The website has e-learning plugins, WooCommerce and several other plugins. I am trying to use WooCommerce and informational bits on one site and move the e-learning bit to a subdomain. The WooCommerce customer data needs to sync with the e-learning site. Once someone purchases a product, they will be given a role to access a course on the other site. How do I make this happen?

    • This topic was modified 3 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Instead of syncing data, consider getting data dynamically as needed from where ever it’s normally stored. For example, the e-learning site could get any WC user data it needs via the WC REST API every time it needs it. This way the data is always current and correct. No need to be concerned with it being stale due to a tardy sync operation.

    Sometimes sync is unavoidable. Then the best way to maintain sync is to have the site where the data is maintained immediately update the remote site any time the data is modified. The remote site will need an endpoint where the updated data could be sent as needed. A RESTful API is again a useful way to manage this.

    The least desirable way to sync would be to periodically run a sync operation at regular intervals via scheduled Cron tasks. This introduces a possibility of stale data if the interval is too long, or excessive data transmission if too short.

Viewing 1 replies (of 1 total)
  • The topic ‘How to sync users between 2 websites?’ is closed to new replies.