Automattic\WooCommerce\Internal\StockNotifications\Frontend
MyAccountEndpoint::get_endpoint_slug
Get the configured endpoint slug.
The slug is what appears in the URL. {@see self::ENDPOINT} stays the query var key everything else is wired to, the same split core uses for its own endpoints. An empty slug disables the endpoint.
Метод класса: MyAccountEndpoint{}
Хуков нет.
Возвращает
string. The configured slug, or an empty string when the endpoint is disabled.
Использование
$result = MyAccountEndpoint::get_endpoint_slug(): string;
Код MyAccountEndpoint::get_endpoint_slug() MyAccountEndpoint::get endpoint slug WC 11.2.2
public static function get_endpoint_slug(): string {
$slug = get_option( self::ENDPOINT_OPTION, self::ENDPOINT );
return is_string( $slug ) ? $slug : self::ENDPOINT;
}