Static function with DefaultToSelf?

I’m trying to create a visible Target-pin for Blueprints that defaults to “self” for a static function like this one:

222623-want.png

This is what I have now (but does not work):

UFUNCTION(BlueprintCallable, Category = "Custom", meta = (DefaultToSelf = "target"))
static void PrintError(UObject* target, const FString errorMessage = "Cast failed.");

I looked at how UE4 does it. Example:

UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="User Interface|Animation")

Erm… It does not even have DefaultToSelf. So how does one implement this pin?

I found how to do it for invisible pins but still now how to do it for visible ones:

// Prints a custom error 
UFUNCTION(BlueprintCallable, Category = "Custom", meta = (WorldContext = "worldContextObject", ShowWorldContextPin))
static void PrintError(UObject* worldContextObject, const EErrorLocationType ErrorLocType = EErrorLocationType::NameOnly, const FString errorMessage = "Cast failed.");

ShowWorldContextPin does not work and neither does it when putting it in the UCLASS() but at least I can default to self. But I can’t seem to be able to expose the pin VISIBLY.