You’re trying to use get_the_ID
inside your callback function, but get_the_ID
will only work inside the loop.
You should send your post ID to your callback function explicitly instead.
You’re trying to use get_the_ID
inside your callback function, but get_the_ID
will only work inside the loop.
You should send your post ID to your callback function explicitly instead.