WPIntell

Source evidence

Import API data into a tab

Custom Product Tabs for WooCommerce WP All Import Add-on · support · 2020-07-13T23:40:00+00:00

neutralsentiment
lowseverity
0.38relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

9 / 38 rows with source links

23.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Tom Palmer resolved
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] 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

Comments

1 shown
Freddie 2020-07-21T15:00:00+00:00

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