You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects::get_object() can't be forced to return Clarkson_Object because you can overwrite the the Object Type via the clarkson_core_create_object_callback filter.
The inline documentation gives an example that you could return the result of e.g. wc_get_order which is a WC_Order or in our case wc_get_product why this filter was initialy introduced for the use-case that @NielsdeBlaauw had. wc_get_product returns something base on WC_Product.
Objects::get_object()
can't be forced to returnClarkson_Object
because you can overwrite the the Object Type via theclarkson_core_create_object_callback
filter.The inline documentation gives an example that you could return the result of e.g.
wc_get_order
which is aWC_Order
or in our casewc_get_product
why this filter was initialy introduced for the use-case that @NielsdeBlaauw had.wc_get_product
returns something base onWC_Product
.Method
get_object
: https://github.com/level-level/Clarkson-Core/blob/master/src/Objects.php#L168Filter
clarkson_core_create_object_callback
https://github.com/level-level/Clarkson-Core/blob/master/src/Objects.php#L214-L241Original Issue with explaination: #131
Easy fix would be to remove the return type, other option would be that return type should be at least an
object
(since 7.2) https://www.php.net/manual/en/language.types.declarations.phpThe text was updated successfully, but these errors were encountered: