mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
✨ Inject paymentComponent to phone-sync-handler
This commit is contained in:
parent
55635d11c0
commit
50daa3e99e
3 changed files with 6 additions and 2 deletions
|
@ -36,8 +36,9 @@ const getSanitizedPhoneNumber = ( select ) => {
|
|||
* Custom hook to synchronize the WooCommerce phone number with a React component state.
|
||||
*
|
||||
* @param {Function} setWooPhone - The state setter function for the phone number.
|
||||
* @param {Object} paymentComponent - The CardField component from Fastlane.
|
||||
*/
|
||||
export const usePhoneSyncHandler = ( setWooPhone ) => {
|
||||
export const usePhoneSyncHandler = ( paymentComponent, setWooPhone ) => {
|
||||
// Fetch and sanitize phone number from WooCommerce.
|
||||
const phoneNumber = useSelect( ( select ) =>
|
||||
getSanitizedPhoneNumber( select )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue