Skip to content

get_field on term #32

@danygit

Description

@danygit

Version information

  • Plugin version : 1.1.4
  • PHP : 7.2.10
  • WordPress :
  • ACF version : 5.7.7
  • Polylang version : 2.4

Steps to reproduce

  1. Add acf field in term
  2. do get_field('NAME_OF_FIELD'), WP_Term Term) on page.

What was expected

No error

What happened instead

( ! ) Catchable fatal error: Object of class WP_Term could not be converted to string in /var/www/html/web/wp-content/plugins/acf-options-for-polylang/classes/helpers.php on line 16

My opinion

  1. The problem come to
    add_filter( 'acf/validate_post_id', [ $this, 'set_options_id_lang' ], 10, 2 );

Filter is deprecated and dont work with acf term field.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions