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.
Method of the class: MyAccountEndpoint{}
No Hooks.
Returns
string. The configured slug, or an empty string when the endpoint is disabled.
Usage
$result = MyAccountEndpoint::get_endpoint_slug(): string;
MyAccountEndpoint::get_endpoint_slug() MyAccountEndpoint::get endpoint slug code WC 11.3.0
public static function get_endpoint_slug(): string {
$slug = get_option( self::ENDPOINT_OPTION, self::ENDPOINT );
return is_string( $slug ) ? $slug : self::ENDPOINT;
}