Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [api]

An application programming interface (API) specifies how some software components should interact with each other. In addition to accessing databases or computer hardware, such as hard disk drives or video cards, an API can be used to ease the work of programming graphical user interface components. In practice, most often an API is a library that includes specifications for routines, data structures, object classes, and variables.

-1
votes
0answers
10 views

Page structure using The Customizer Api

so I'm trying to customize themes using The Customizer Api, and I've noticed that I can only change the css, is there a way to control the page structure and layout ?
0
votes
0answers
15 views

WP API V2 Filtering URL request second tier

I currently have a WP API URL call that looks like https://siteurl/wp-json/wp/v2/knowledge_base?_embed&knowledge_types=8 The JSON code looks like [ { "knowledge_types": 8, } ] How ...
0
votes
1answer
8 views

Wordpress API response filter by ACF value

I'm building a site with wordpress API. I'm using Advanced Custom Fields, and also ACF to Rest API plugin to expose ACF data in API: https://github.com/airesvsg/acf-to-rest-api Now I'm trying to ...
0
votes
1answer
13 views

Customizer JS API get value of customizer field

I want to use a javascript plugin on my website that should be initialized with values set in the wordpress customizer. Kirki::add_field( 'artist_theme_config', array( 'type' => 'select', ...
0
votes
0answers
7 views

woocommerce update user using REST API

I'm building a SPA using wordpress with woocommerce as the backend. I need customers to be able to change their settings (like billing address) from within the SPA, so I wrote a custom endpoint for ...
0
votes
0answers
10 views

Display index page to user from WP custom plugin

I want to write a simple plugin to display a maintenance mode page. How I can do this? Is there a specify wordpress API to display this page on front-end?
0
votes
0answers
24 views

How to integrate an airtime payment to woocommerce in wordpress

I use woocommerce to sell digital products (audio) on my website. I found about a service that powers an airtime payment gateway so I want to know how to integrate it to woocommerce as a payment ...
0
votes
0answers
16 views

Sending WordPress Data (API) to SQL table

Looking for a solution that can send our WordPress checkout data to a local SQL database in certain table. We have custom form to capture data needed from user for our YII application, just no way to ...
1
vote
1answer
61 views

Stuck with wp_remote_post sending data to an external api on user registration

I am trying to create a basic plugin to send user details to a CRM when a user signs up on the WordPress website as a basic subscriber. I have reached a sticking point, I have tried to interpret the ...
0
votes
1answer
14 views

Create API for registering user on wordpress site with 3rd party site

My site needs to integrate with a 3rd party CRM software, which will live on its own sub-domain, hosted by the CRM company. 1) www.example.com - Main Site 2) testsite.example.com - CRM Hosted on the ...
0
votes
0answers
65 views

Autotrader API Integration

I am looking to pull in a feed of used cars from Autotrader. Has anyone had any luck with the Autotrader API Docs and integrating with WordPress? Their current API documentation is very vague - is ...
0
votes
0answers
13 views

Relations between taxonomy terms for getting parent child nested Json objects and arrays

i have 2 taxonomies (cat) (subcat) and they have some terms(rows) for example , , i want make a relation like SQL data tables between the taxonomy terms for giving me a nested object of arrays in the ...
0
votes
1answer
50 views

Implementing an AJAX POST API call in wordpress

I'm attempting to make a POST request to an API. I've created a javascript file in my theme and i have tried two approaches so far: Approach 1: $.ajax({ headers:{ "Content-Type"...
0
votes
0answers
17 views

How do I include an external API in a wordpress plugin?

I would like to include external API libraries hosted by google on a plugin I am developing and I can't figure out how to. I have a couple that I would like to include in my header. I have tried the ...
0
votes
1answer
42 views

WordPress Upgrade - API files returning 404 on Multisite

I've just upgraded to WordPress 5, and all is working fine on the main site. However on the two sub-branch sites, when I try to create a new post, I receive a white screen and the console reports 404 ...
0
votes
1answer
21 views

How can I call an api before user login

I have a custom login, in which I have 2 apis: The first to post a user phone, and the second to post the user pin to verify the phone. The main issues is that these 2 apis, which has the following ...
0
votes
0answers
18 views

Same function but different add_settings_field

I have two fields but related to each other; Is it possible to have two add_settings_field() with same function? or one add_settings_field() with multiple $id and one function? Or just should have ...
0
votes
0answers
99 views

REST API get featured image source for custom post type

I created a custom post type and am getting the posts using the REST API. The returned json looks like this... categories: [] content: {raw: "Morbi mollis tellus ac sapien. Etiam ut purus matt…allis ...
0
votes
0answers
15 views

API: get the post ID by “title” from external site with cURL

Given $title = "This is the title of a post"; I want to cURL the API and get the post ID. With v1 you could use the [filter] parameter, but that no longer works. There is a similiar question: https:...
0
votes
0answers
28 views

History API & URL for single long page

I'm working on a NON-API Wordpress site. One of the pages is a long page segmented into several sections. At the top of the page is a menu for most of the sections on the page. When a user lands on ...
0
votes
1answer
18 views

Different function call depending on shortcode?

So I've modified a piece of code that includes a call to the Google Distance Matrix API. I wanted it to only work out the distance to a specific address. But I now also want to use it on a different ...
0
votes
0answers
11 views

It's possible to get new features and bugs fixed from the WordPress API?

What I want to do is get the new features and the information related from a specific version of Word Press. I want to get this information from an external php platform. I check the Word Press API ...
0
votes
1answer
23 views

Sending POST Request from server

I have to make a Post request to below and get the response . How can I do this in WordPress. I have [CLIENT_ID] and [CLIENT_SECRET] - i can just change it. [REFRESH_TOKEN] is $_GET('code'); POST ...
0
votes
2answers
174 views

How do I filter Child Posts by Parent Post ID for Custom Post types in Wordpress REST API response?

I have two Custom post types: question and answer. "Questions" are hierarchical and they are parent posts for answers - which are child posts. For every answer, there's a parent question. When someone ...
0
votes
0answers
16 views

Detecting if a Youtube video has been watched and change something on a page in reaction to it

Every of my Youtube videos has a dedicated Wordpress page. I want to detect if a video has been watched (say for example for 80%) and in reaction to it, I want to change something on it's page (I want ...
0
votes
1answer
30 views

Creating posts, containing data from remote API

I need some help and guidance. So I'm developing a website(custom theme) where the goal is to get data from a remote API. I want to be able to store the data in individual posts (one custom post type)...
0
votes
0answers
89 views

WP REST API - Add post with taxonomy using term_name

Hi there we have API requests hitting our WP site to import posts into a custom post type. In the JSON for the post type the taxonomy "job_sector" is sent through as a string using the terms name ...
2
votes
3answers
121 views

Defer Code in Widgets - Page Speed

How to UP Page Speed With Widget Defer? Is there a way to defer a widget in the footer? I have an external API in a footer widget which is slowing down my page. It is not needed until the page is ...
0
votes
1answer
20 views

Passing data outside of Wordpress possible?

We're exploring some possibilities to upgrade our web development tools in using Wordpress, but we're concerned whether or not there is a good plug-in to build custom forms in WordPress and pass data ...
1
vote
1answer
41 views

How do I start using an external API and PHP for a WordPress.org page?

I have created some reports for some web pages that use JavaScript HTTP Requests to retrieve some data from an API. I would like to use the reports on some WordPress pages. I have done a lot of ...
0
votes
1answer
63 views

Import product in my woocommerce site from another site via API

I want to import products from simpletire.com via the API they have given me. The API looks like this: Web Service Path : https://api.simpletire.com/wholesale/ENVIRONMENT/OPERATION/APIKEY Parameters ...
0
votes
0answers
161 views

Envato Purchase Code Verifier

I'm using Envato API to verify Purchase Code I used plugin sample code from GitHub https://github.com/codehaiku/Envato-Purchase-Code-Verifier here I added token and AUTHOR_SALES_ENDPOINT_URI = 'https:/...
0
votes
1answer
308 views

400 Bad Request - JavaScript App calling Custom wp-json endpoint

I have successfully created a new endpoint/route and can view it via wp-json. Not only that, I can successfully make a post request to this endpoint externally from the browser using the Restlet ...
0
votes
1answer
70 views

Problem with Settings API: changes are not saved after submit

I'm writing a plugin "Paid Post" with some options. I made a settings page for my plugin, and it displays OK, but when I'm pressing "save changes" button, the option I have do not change, it just ...
0
votes
1answer
60 views

How to fix AWS SNS API end point code that cause site not to load?

I'm trying to create an API endpoint in a Wordpress site that can receive AWS Simple Notification Service notification. I have this working now, but on the front end, the site does not load. Here are ...
0
votes
2answers
65 views

Gravit Forms Notification send after 3rd party API response

I have a Gravity Form that on submission sends the data to a third party API. It is connecting with the following code and saving the data through the API. However, I'm now trying to figure out how to ...
0
votes
2answers
612 views

This page can't load Google Maps correctly [closed]

I am trying to get map from address but there are appear some error like You have exceeded your request quota for this API in my console so can anyone help me to fix this. My Javascript code look ...
0
votes
1answer
20 views

Periodically Query an external API on wordpress site

I am creating a wordpress site that will periodically retrieve data from an API and use that data to update info in the wp_users table. I don't really know how to go about this. I'll start with 2 ...
0
votes
0answers
53 views

Login and registration integration with 3rd party API [closed]

I have a 3rd part API that register/login users to its system after buying a product, I want to integrate this API with the login and registration. Scenarios: WP user login -> call API for ...
0
votes
1answer
16 views

email address non required

I am developing a website and an application for it using Woocommerce and Ionic with the help of Woocommerce's API. I'm trying to make email field in the register page optional and make customers ...
0
votes
0answers
308 views

Post to WordPress API using cURL and login cookies

I want to post from one WordPress install [SiteA] to another [SiteB] using the http API and cURL. I have found plenty of JS examples where the auth cookie is loaded into the browser, and then an AJAX ...
0
votes
1answer
341 views

Calling an API to do authentication / user login

I'm relatively new to wordpress and am working on a customized site. I have an API endpoint that I'd like to call to do authentication, because our users are going to have their credentials stored/...
0
votes
0answers
37 views

Deleting custom post type from external API via wp_delete_post

I've been working with an external API to pull in data and create what's essentially a job board via custom post types with wp_insert_post. My concern is that once these jobs/custom posts are removed ...
0
votes
0answers
60 views

wp_remote_get is stripping out Link header values

Using this code: $get_webinars = wp_remote_get('https://link.com/api/v1/accounts/6/courses?per_page=250&include[]=syllabus_body', array( 'headers' => array( 'Authorization' => '...
0
votes
1answer
81 views

how to fetch posts from Api in chunks or parts?

I'm working on a Hubspot Api and trying to fetch all blog posts through api, but the api limit is only 20 post each time and i need to get 1960 blog posts. So how i supposed to do that? Is there any ...
-1
votes
2answers
1k views

How to login via wordpress api and get user details?

I want to login via wordpresss api. I tried with "/wp-json/wp/v2/users" . but it just returns user 1 details. My goal is login via api and fetch all profile information.
2
votes
1answer
140 views

Hide/show customizer controls based on other settings in Customizer

This may be an easy one for those who know jquery. So, I have two customizer controls. First one is lmscore_improved_summary which is a checkbox. And the second one is course_instructor_layout. So ...
0
votes
2answers
18 views

How to find out programmatically whether any cache plugin is installed in the WordPress website?

I want to know Whether any cache plugin is installed in the WordPress website or not. At present, I get all active WordPress plugin ( Using get_option('active_plugins')) and check one by one, whether ...
1
vote
2answers
47 views

Wordpress site in China times out on requests to youtube [closed]

My wordpress site dj.pyromusic.cn is based in China, on a chinese server. Somewhere in the theme, or the site, it is making a request to youtube which is obviously blocked here, causing the load time ...
4
votes
2answers
1k views

Why is per_page not working with categories in WP API?

To start I've been searching through several questions and documentation pieces but it seems with WordPress' v2 many of the old questions are no longer valid. What I am trying to do is get all posts ...