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

PseudoClassExtension::translateLastOfTypepublicWC 1.0

Method of the class: PseudoClassExtension{}

No Hooks.

Returns

null. Nothing (null).

Usage

$PseudoClassExtension = new PseudoClassExtension();
$PseudoClassExtension->translateLastOfType( $xpath ): XPathExpr;
$xpath(XPathExpr) (required)
.

PseudoClassExtension::translateLastOfType() code WC 10.4.3

public function translateLastOfType(XPathExpr $xpath): XPathExpr
{
    if ('*' === $xpath->getElement()) {
        throw new ExpressionErrorException('"*:last-of-type" is not implemented.');
    }

    return $xpath
        ->addStarPrefix()
        ->addCondition('position() = last()');
}