Magento 2: How to remove Tooltips from checkout page?
I really really don't know if it's the Magento right way but I tried this:
<item name="telephone" xsi:type="array">
<item name="config" xsi:type="array">
<item name="tooltip" xsi:type="boolean">false</item>
</item>
</item>
and it worked for me.
After many attempts I came to this conclusion: the Knockout template searches for the element tooltip
<!-- ko if: element.tooltip -->
<!-- ko template: element.tooltipTpl --><!-- /ko -->
<!-- /ko -->
so it's expecting it to exist OR to be a boolean value set to true, so I just converted it in type boolean set to false.
We can hide it with CSS. However, we can use Plugin to remove it:
app/code/Vendor/Checkout/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="custom-checkout-process" type="Vendor\Checkout\Plugin\LayoutProcessorPlugin" />
</type>
</config>
app/code/Vendor/Checkout/Plugin/LayoutProcessorPlugin.php
<?php
namespace Vendor\Checkout\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']['telephone']['config']['tooltip']);
return $jsLayout;
}
}