Skip to content

Commit

Permalink
chore: remove deprecated usage of get_terms
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermani committed Jan 30, 2024
1 parent 438f4d0 commit 557105c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/data-events/class-webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,12 @@ public static function get_endpoint( $endpoint_id ) {
* @return array Array of endpoints.
*/
public static function get_endpoints() {
$terms = \get_terms( self::ENDPOINT_TAXONOMY, [ 'hide_empty' => false ] ); // phpcs:ignore WordPress.WP.DeprecatedParameters.Get_termsParam2Found
$terms = \get_terms(
[
'taxonomy' => self::ENDPOINT_TAXONOMY,
'hide_empty' => false,
]
);
$endpoints = array_map( [ __CLASS__, 'get_endpoint_by_term' ], $terms );

return array_values( array_merge( $endpoints, self::$system_endpoints ) );
Expand Down

0 comments on commit 557105c

Please sign in to comment.