• Is it possible to publish mqtt to broker whenever a user changes a specific meta-data field and then pass that value of that field into the message? Is it also possible to pass the userID or similar into the mqtt “topic”?

    (I need this for a IoT application and calling WP REST API seams much more complicated and not at all as light-weight.)

Viewing 1 replies (of 1 total)
  • Plugin Author Roy Tanck

    (@roytanck)

    Oops, I missed this question. Sorry.

    Updating a user meta field should trigger the ‘updated_usermeta’ hook, so you can use this to send an MQTT message.

    https://hookr.io/4.7.4/actions/updated_usermeta/

    The user’s ID is one of the hooks parameters, so you should be able to send that along using the %ARG1% placeholder.

    This fires for each user meta field, so you might need to also pass the meta_key (%ARG2%), and apply some filtering in your client.

Viewing 1 replies (of 1 total)
  • The topic ‘Get user meta data’ is closed to new replies.