Automattic\WooCommerce\EmailEditorVendor\Symfony\Component\CssSelector\XPath\Extension

AttributeMatchingExtension::translateSubstringMatch │ public │ WC 1.0

Метод класса: AttributeMatchingExtension{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$AttributeMatchingExtension = new AttributeMatchingExtension();
$AttributeMatchingExtension->translateSubstringMatch( $xpath, $attribute, ?string $value ): XPathExpr;
$xpath(XPathExpr) (обязательный)
.
$attribute(строка) (обязательный)
.
?string $value(обязательный)
.

Код AttributeMatchingExtension::translateSubstringMatch() WC 11.2.2

public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
    return $xpath->addCondition($value ? sprintf(
        '%1$s and contains(%1$s, %2$s)',
        $attribute,
        Translator::getXpathLiteral($value)
    ) : '0');
}