woocommerce / facebook-for-woocommerce

A first-party extension plugin built for WooCommerce. Development is managed by Ventures.
https://woocommerce.com/products/facebook/
GNU General Public License v2.0
211 stars 140 forks source link

Redoing how we fetch access tokens from WooCommerce Connect Server. #2788

Closed rawdreeg closed 3 months ago

rawdreeg commented 3 months ago

Changes proposed in this Pull Request:

Must be tested together with https://github.com/Automattic/woocommerce-connect-server/pull/2563.

Refactors how oAuth access tokens are obtained. Instead of taking them from the incoming query string, a call to WooCommerce Connect Sever to exchange the incoming oAuth code for the access token is made.

Detailed test instructions:

  1. Set up a local wcs environment using the woocommerce-connect-server's (https://github.com/Automattic/woocommerce-connect-server/pull/2563) branch.
  2. Configure the extension to use your local WooCommerce Connect Server version by search-replacing api.woocommerce.com with your local wcs url through the includes/Handlers/Connection.php file of the plugin.
  3. Try to connect your Facebook for WooCommerce plugin to Facebook.

Changelog entry

Update - Access Token retrieval procedure.