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

AttributeMatchingExtension::translateDifferent │ public │ WC 1.0

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

Хуков нет.

Возвращает

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

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

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

Код AttributeMatchingExtension::translateDifferent() WC 11.2.2

public function translateDifferent(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
    return $xpath->addCondition(sprintf(
        $value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s',
        $attribute,
        Translator::getXpathLiteral($value)
    ));
}