Is your enhancement related to a problem? Please describe.
EDIT: added form save code (copy from Core class), to complete proof of concept.
I created a quick Woocommerce 2FA account settings implementation. The form save functionality needs to be implemented still, but I wanted to drop my idea here.
With the following code the form renders well and the [verify totp], [deactivate totp], [generate codes] and [download codes] buttons function.
Next, I will seperate the user profile admin saving function from the action hook, and make sure both the front end and backend will use the same save function. In theory that should be enough to have a crude(?) initial separation of the admin settings.
As the dummy and U2F provider are shown on front end I add a filter to remove these from the front end settings.
Proposed Solution
Proof of Concept
-edit- see plugin repo in comment below
Is your enhancement related to a problem? Please describe.
EDIT: added form save code (copy from Core class), to complete proof of concept.
I created a quick Woocommerce 2FA account settings implementation. The form save functionality needs to be implemented still, but I wanted to drop my idea here.
With the following code the form renders well and the [verify totp], [deactivate totp], [generate codes] and [download codes] buttons function.
Next, I will seperate the user profile admin saving function from the action hook, and make sure both the front end and backend will use the same save function. In theory that should be enough to have a crude(?) initial separation of the admin settings.
As the dummy and U2F provider are shown on front end I add a filter to remove these from the front end settings.
Proposed Solution
Add Two_Factor_Woo class
Adjust Two_Factor_Core class
Add Two_Factor_Woo.js
Proof of Concept