Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Such plugins should add a settings page to the main settings screen, under an integrations tab. If they are using that API that is.

    Thread Starter c4boomb

    (@c4boomb)

    That is the problem, i dont want to use this method.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I’m not really sure what you’re asking here. If you’re using an ‘integration’ though the integration API, you need to use the setting screens.

    If you’re not, and this is just a plugin external to WooCommerce, you use the options API to set values https://codex.ww.wp.xz.cn/Options_API

    Options API can also be used to manually change values in an integration but the option is a serialised array of values, so you need to work with that data structure to avoid breaking them.

    Thread Starter c4boomb

    (@c4boomb)

    That’s what i need. Dont you have some examples, of how to work with integration from options api?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I don’t document examples for edge cases. The option name will be woocommerce_YOURINTEGRATIONID_settings. I’d suggest you get_option and var_dump this to see the structure. It will be an array of keys and values.

    Thread Starter c4boomb

    (@c4boomb)

    Thank you so much!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Woocommerce integration settings’ is closed to new replies.