transformer_refactoring #44

Merged
linos merged 42 commits from transformer_refactoring into main 2024-10-02 19:15:29 +02:00
Showing only changes of commit 3f7f996e10 - Show all commits

View file

@ -226,8 +226,10 @@ abstract class Event extends Post {
// Add all category terms.
$terms = \get_the_terms( $this->wp_object, $this->wp_taxonomy );
foreach ( $terms as $term ) {
$categories[] = $term->name;
if ( $terms && ! is_wp_error( $terms ) ) {
foreach ( $terms as $term ) {
$categories[] = $term->name;
}
}
if ( ! empty( $categories ) ) {