Axo Blocks: Migrate console logs to the Axo log function

This commit is contained in:
Daniel Dudzic 2024-09-26 12:47:04 +02:00
parent b44dd0a8d9
commit 70676468b8
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
15 changed files with 82 additions and 94 deletions

View file

@ -1,5 +1,6 @@
import { useEffect, useRef, useCallback } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { log } from '../../../../ppcp-axo/resources/js/Helper/Debug';
import { debounce } from '../../../../ppcp-blocks/resources/js/Helper/debounce';
import { STORE_NAME } from '../stores/axoStore';
import useCustomerData from './useCustomerData';
@ -26,7 +27,7 @@ const sanitizePhoneNumber = ( phoneNumber = '' ) => {
* @param {string} phoneNumber - The new phone number to prefill.
*/
const updatePrefills = ( paymentComponent, phoneNumber ) => {
console.log( 'Update the phone prefill value', phoneNumber );
log( `Update the phone prefill value: ${ phoneNumber }` );
paymentComponent.updatePrefills( { phoneNumber } );
};