2

Tell me how to remove tooltip from the checkout email field. enter image description here

I tried this way

enter image description here

app/code/Dv/Tooltip/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Dv_Tooltip',
    __DIR__
);

app/code/Dv/Tooltip/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Dv_Tooltip" setup_version="1.0.0" />
</config>

app/code/Dv/Tooltip/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="dv-checkout-process" type="Dv\Tooltip\Plugin\LayoutProcessorPlugin" />
    </type>
</config>

app/code/Dv/Tooltip/Plugin/LayoutProcessorPlugin.php

<?php

namespace Dv\Tooltip\Plugin;

use Magento\Checkout\Block\Checkout\LayoutProcessor;

class LayoutProcessorPlugin
{
    /**
     * @param LayoutProcessor $subject
     * @param $jsLayout
     * @return mixed
     */
    public function afterProcess(
        LayoutProcessor $subject,
        $jsLayout
    ) {
        //Remove telephone tooltip
        unset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
            ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['email']['config']['tooltip']);

        return $jsLayout;
    }
}

php bin/magento s:up

After this tooltip is still there

2

You can use this line to remove email tooltip text.

unset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['customer-email']['tooltip']);

Instead of using this..

unset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['email']['config']['tooltip']);

After changing this please clear Magento cache and check you can't see tooltip text but you can see tooltip icon there. If you want to remove that icon then you need to override below file in your custom theme/module..

vendor/magento/module-checkout/view/frontend/web/template/form/element/email.html

In above file you just need to remove below line

<!-- ko template: 'ui/form/element/helper/tooltip' --><!-- /ko -->

Once you remove this line you will not get that tooltip icon for email. So you do not need to create any Plugin to remove Tooltip text, you can directly remove above line in html file and you can hide it.

Hope this will help you!

| improve this answer | |
0

Just add 'null' value for tooltip field, like so:

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['customer-email']['config']['tooltip'] = null;

It does work woth 'telephone' on shipping form field in Magento 2.3

| improve this answer | |
0

Open the file vendor/magento/module-ui/view/frontend/web/templates/form/element/helper/tooltip.html

And find below code in the file:

<\span id="tooltip-label" class="label"\><\!-- ko i18n: 'Tooltip' --><!-- /ko --><\/span>

Make the code changes as mentioned below:

<\span id="tooltip-label" class="label"\><\/span\>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.