Support » Plugin: GamiPress » Extend API response

  • Resolved lgousiou

    (@lgousiou)


    Hi,

    I am wondering if there is a way to extend request response for a gamipress API call by adding an additional parameter and in what way we can achieve it. What object_type can we use in register_rest_field function?

Viewing 1 replies (of 1 total)
  • Plugin Author rubengc

    (@rubengc)

    Hi @lgousiou

    If you are referring to the GamiPress logs and user earnings

    The register_rest_field function only will work with the WordPress standard object types, not with our custom ones

    We use an in-house library to handle our custom tables that you can check here:
    https://github.com/rubengc/CT
    This library is developed to make it as extensible as possible so you can find several hooks to change any endpoint workflow

    Other option, and probable more simple, is to create your custom endpoint with the parameters and workflow you want

    Best regards

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.