diff --git a/CHANGELOG.md b/CHANGELOG.md index b04de49..ce5ffe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Integration for EventPrime – Events Calendar, Bookings and Tickets +### Fixed + +* Fixed that transformer hook function might also return `null`. + ## [0.2.1] - 2024-11-16 ### Added diff --git a/README.md b/README.md index c23c1b6..7e64f0f 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma * Integration for EventPrime – Events Calendar, Bookings and Tickets +### Fixed + +* Fixed that transformer hook function might also return `null`. + ### [0.2.1] 2024-11-16 ### * Initial release on https://wordpress.org/ diff --git a/includes/class-setup.php b/includes/class-setup.php index 665f444..3b5ef0b 100644 --- a/includes/class-setup.php +++ b/includes/class-setup.php @@ -253,7 +253,7 @@ class Setup { * * @return \Activitypub\Transformer\Base|null */ - public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): \Activitypub\Transformer\Base { + public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): ?\Activitypub\Transformer\Base { // If the current WordPress object is not a post (e.g., a WP_Comment), don't change the transformer. if ( 'WP_Post' !== $object_class ) { return $transformer;