Updated deprecated function in post_category case

Removed the deprecated function `get_all_category_ids` and replaced with `get_terms` within the post_category case to remove deprecated warning when WP_DEBUG is set to true.