• Resolved Tom Palmer

    (@tompalmer999)


    Hi,

    I’d like to import the ProPublica Nonprofit Explorer API into a custom tab, mapping the data to the appropriate nonprofit.

    Can this be done?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hey @tompalmer999,

    Yes, this could be done but its most likely that you wouldn’t use this plugin or even Custom Product Tabs for WooCommerce because that defeats the purpose of having an interface if they’re going to be populated by an api.

    You could just filter the tabs and add a new tab for the current product with the api information.
    https://docs.woocommerce.com/document/editing-product-data-tabs/

    That doc will have everything you need to add new tabs programatically. You’ll need to use that filter, find the current product using the global $woocommerce variable and then hit your api to get the tab data. Then you can just format the tab and push it in with the other default tabs.

    Hope this helps!
    – Freddie

Viewing 1 replies (of 1 total)
  • The topic ‘Import API data into a tab’ is closed to new replies.