Hi Team
I wonder if you could test this out as it seems to be a consistent bug I am encountering.
I have a post type with custom numerical custom fields that are set to ZERO - 0 - as their default (see custom field image).
The custom post type is being created in PHP. I do not set the custom fields to zero because they are already set to zero as their 'default'.
When I run PHP code using the custom fields I am getting a PHP error because it thinks the numerical value is a string and not an integer (see PHP error image).
However. if I 'update' the post in the admin panel, then the numerical custom fields now indeed contain an integer with a value of zero and the PHP code works.
Thanks.
Okay - so default values are only present when the post is 'SAVED' and not when the post is 'CREATED'.