B
B
BoGur2021-10-13 18:17:45
PHP
BoGur, 2021-10-13 18:17:45

How to add value to Post Object field in ACF via code?

How to add value to Post Object field in ACF via code?
I need to add value through update_fields through code.
6166f77de296c516254125.png

The normal embed code in the field doesn't work. Here is the code:

$value[] = array("perks" => 9999);
update_field($field_key, $value, $post_id);


Tried like this: And like this: Maybe superfluous, but nothing works (I would be very grateful if you help
$value = array("perks" => 9999);

$value[] = array(9999);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question