The Delete Permission User API only removed Meta connection assets from the WooCommerce database, leaving asset-related data enabled on Meta surfaces.
If a user disconnected the connection before uninstalling assets from Meta surfaces using Managed Connection; the UI for Managed Connection was also removed, making it difficult for users to uninstall this feature from Meta surface.
Solution:
Replaced the Delete Permission User API with the recommended Delete FBE Connection endpoint, which uninstalls assets from Meta surfaces and removes their permissions.
Removed the Managed Connection UI button for uninstalling FBE from Meta surfaces, as the Delete Connection endpoint now handles this functionality.
Screenshots:
Before:
After:
Detailed test instructions:
Run new tests: ./vendor/bin/phpunit --filter test_delete_mbe_connection_deletes_user_permission_request
Run all tests : npm run test:php
Lint: ./vendor/bin/phpcs
Manual testing: I have tested new Disconnect UI flow; it uninstall FBE connection from WooCommerce as well as from Meta surface
Changelog entry
Removed: Delete Permission User API
Added: Delete FBE Connection endpoint to uninstall assets from Meta surfaces and remove permissions
Removed: Managed Connection UI button for uninstalling FBE from Meta surfaces (now handled by Delete Connection endpoint)
Changes proposed in this Pull Request:
Problem:
Solution:
Screenshots:
Before:
After:
Detailed test instructions:
./vendor/bin/phpunit --filter test_delete_mbe_connection_deletes_user_permission_request
npm run test:php
./vendor/bin/phpcs
Changelog entry
Removed: Delete Permission User API Added: Delete FBE Connection endpoint to uninstall assets from Meta surfaces and remove permissions Removed: Managed Connection UI button for uninstalling FBE from Meta surfaces (now handled by Delete Connection endpoint)