Update code comments

This commit is contained in:
Daniel Dudzic 2024-09-23 11:11:56 +02:00
parent 47ceb8333b
commit 8ef129066b
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -85,14 +85,14 @@ export const populateWooFields = (
const checkoutDispatch = dispatch( CHECKOUT_STORE_KEY ); const checkoutDispatch = dispatch( CHECKOUT_STORE_KEY );
// Disable the 'Use same address for billing' checkbox if the method exists. // Uncheck the 'Use same address for billing' checkbox if the method exists.
if ( if (
typeof checkoutDispatch.__internalSetUseShippingAsBilling === 'function' typeof checkoutDispatch.__internalSetUseShippingAsBilling === 'function'
) { ) {
checkoutDispatch.__internalSetUseShippingAsBilling( false ); checkoutDispatch.__internalSetUseShippingAsBilling( false );
} }
// Save shipping address // Save shipping address.
const { address, name, phoneNumber } = profileData.shippingAddress; const { address, name, phoneNumber } = profileData.shippingAddress;
const shippingAddress = { const shippingAddress = {
@ -110,7 +110,7 @@ export const populateWooFields = (
console.log( 'Setting WooCommerce shipping address:', shippingAddress ); console.log( 'Setting WooCommerce shipping address:', shippingAddress );
setWooShippingAddress( shippingAddress ); setWooShippingAddress( shippingAddress );
// Save billing address // Save billing address.
const billingData = profileData.card.paymentSource.card.billingAddress; const billingData = profileData.card.paymentSource.card.billingAddress;
const billingAddress = { const billingAddress = {