Merge pull request #2690 from woocommerce/PCP-3778-axo-block-the-fastlane-watermark-under-the-email-input-should-always-display-the-more-info-icon

Axo Block: Always display the Fastlane watermark in the includeAdditionalInfo mode (3778)
This commit is contained in:
Emili Castells 2024-10-11 14:53:22 +02:00 committed by GitHub
commit 7c74400643
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 13 deletions

View file

@ -174,9 +174,6 @@ $fast-transition-duration: 0.5s;
grid-area: watermark;
justify-self: end;
grid-column: 1;
}
&:not(.wc-block-axo-is-authenticated) .wc-block-checkout-axo-block-watermark-container {
margin-top: 0;
}
@ -259,8 +256,8 @@ a.wc-block-axo-change-link {
.wp-block-woocommerce-checkout-fields-block:not(.wc-block-axo-is-loaded) {
.wc-block-checkout-axo-block-watermark-container {
display: flex;
justify-content: left;
margin-left: 10px;
justify-content: right;
margin-right: 10px;
align-items: center;
position: relative;

View file

@ -16,9 +16,6 @@ import {
*/
const WatermarkManager = ( { fastlaneSdk } ) => {
// Select relevant states from the AXO store
const isGuest = useSelect( ( select ) =>
select( STORE_NAME ).getIsGuest()
);
const isAxoActive = useSelect( ( select ) =>
select( STORE_NAME ).getIsAxoActive()
);
@ -34,7 +31,6 @@ const WatermarkManager = ( { fastlaneSdk } ) => {
isAxoActive,
isAxoScriptLoaded,
fastlaneSdk,
isGuest,
} );
} else {
// Remove watermark when AXO is inactive and not loading
@ -43,7 +39,7 @@ const WatermarkManager = ( { fastlaneSdk } ) => {
// Cleanup function to remove watermark on unmount
return removeWatermark;
}, [ fastlaneSdk, isGuest, isAxoActive, isAxoScriptLoaded ] );
}, [ fastlaneSdk, isAxoActive, isAxoScriptLoaded ] );
// This component doesn't render anything directly
return null;

View file

@ -112,13 +112,11 @@ export const renderWatermarkContent = ( content ) => {
* @param {boolean} params.isAxoActive - Whether AXO is active.
* @param {boolean} params.isAxoScriptLoaded - Whether AXO script is loaded.
* @param {Object} params.fastlaneSdk - The Fastlane SDK instance.
* @param {boolean} params.isGuest - Whether the user is a guest.
*/
export const updateWatermarkContent = ( {
isAxoActive,
isAxoScriptLoaded,
fastlaneSdk,
isGuest,
} ) => {
if ( ! isAxoActive && ! isAxoScriptLoaded ) {
// Show loading spinner
@ -134,7 +132,7 @@ export const updateWatermarkContent = ( {
createElement( Watermark, {
fastlaneSdk,
name: 'fastlane-watermark-email',
includeAdditionalInfo: isGuest,
includeAdditionalInfo: true,
} )
);
} else {