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.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

permissions checking in ajax

My php function which is called with ajax should check if the user which called the function is administrator. So, is_admin() always returns true because it is a admin page. I just thought about ...
0
votes
0answers
13 views

Wordpress's Rest Api is fetching HTML Code

I am using wordpress rest api to fetch products. But in the rest api, html code is passing too. Snapshot :- https://i.imgur.com/awsnXSc.png I used the following code, so rest api would not fetch the ...
0
votes
0answers
8 views

Portfolio items created indefinitely from external API. Every time different number

I am trying to make new portfolio item for every json item from external api. I am working on Wordpress and placed my code in functions.php of the theme used. When i run my code, it creates portfolio ...
1
vote
0answers
17 views

What would be the best way to implement Magic Link logins in WordPress?

On the internet I saw several plugins/services offering a kind of a 'magic login' link functionality. This allows users to sign in without a password but with a magic link. That made me wondering: If ...
0
votes
0answers
19 views

Use the GET method to get the user id from External API and show all user fields

I'm trying to use the wp_remote_get function to make a call to external api, below the process. The frontend user clicks on the edit profile item. wp_remote_get makes a call which returns the id of ...
0
votes
1answer
30 views

How to query a nested field in wordpress api using _fields param

I'm trying to access certain fields which are deeply nested using _fields param which is offered by wordpress. What's wrong with my query? structure of response. { "_embedded" : { ...
0
votes
0answers
13 views

How do I read Jira issues in a WordPress site using OAuth?

We're trying to setup the Jira REST api and are getting hung up on the OAuth authentication process. We followed the Atlassian (Jira) examples for this but they are seemingly outdated and not working. ...
0
votes
0answers
38 views

Woocommerce REST API - add filter to set maximum query per page for product brands

I'm trying to list all my product brands in a single page, currently i'm able to get only 100 brands per page by using wp-json/wc/v3/products/brands?per_page=100. but if i set per_page=200, i'm ...
0
votes
0answers
23 views

Create a Wordpress Contact Form to call a POST AWS API Gateway and send user data

I am working for a company, and I need to create a Wordpress contact form to call an AWS Api Gateway with a POST Request, but the API function needs to get some parameters: Domain; SecurityKey (each ...
0
votes
0answers
16 views

External API integration in WordPress

I have API URL where I have access key and token along with JSON format. Now I need help as to how to integrate it. My clients need his form leads directly into his API. Below is the code with the ...
0
votes
0answers
15 views

Escape commas in REST API

Sending metadata through the REST API like this, is creating multiple entries because of the commas meta: { plugin_rule_what: 'discount_percentage', plugin_rule_applies_multiple_options:'product_22119,...
0
votes
0answers
17 views

Composer Installed Package with WordPress Rest API Endpoint

I have a WordPress website. I installed composer into my Root Directory before the "www" directory. I installed the Square SDK. I have a WordPress Page which a person enters their C/C ...
0
votes
0answers
13 views

Wordpress API getPosts gives numerical HTML Code

I´m using the REST API from Wordpress to get Posts. Unfortunately there are some characters, which come in numerical HTML Code, like here in the title. GET https:///wp-json/wp/v2/posts { "id&...
1
vote
1answer
37 views

Login WP - Connect single field to an external api

I made a plugin to allow wordpress login with external api. Everything works, now what I have to do is that when a user logs in for the first time, the plugin checks to see if it is already present on ...
0
votes
1answer
97 views

Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure

I am running a self-hosted version of WordPress on a Linode VPS running Debian 9. I was previously using WordPress on a /blog directory because I had a basic HTML site that I decided not to keep any ...
1
vote
0answers
23 views

WordPress as GraphQL client

If I'm using WordPress as a front-end for GraphQL that's hosted on another back-end site, what is the best method/plugin I can use to send queries from WP to another server on the backend? If you ...
0
votes
0answers
38 views

Cannot edit post meta fields with rest API

I am using python to send POST requests to /wp-json/wp/v2/< post type >/< post id >. This successfully updates standard fields such as title, content etc. However I am unable to make any ...
0
votes
0answers
26 views

WP Rest API Media Upload is Successful But Returns 500 Error

I was able to successfully upload an image via the WP Rest API using the following code: $this->guzzle_client->post( $this->trailingSlashIt( $this->url ) . $this->...
0
votes
0answers
8 views

How to make a plugin with a simple API that other plugins can use for queries

I'm curious if there is a way to request information from a plugin. For example I have two plugins I've written that incorporate costs for very different features, yet when it comes time for billing, ...
0
votes
1answer
504 views

How can I get all the woocommerce api orders

When I do a get with my postman to https://page.com/wp-json/wc/v3/orders It only returns 10 results, and in woocommerce I have 2000 orders How can I get those 2000 orders?
0
votes
0answers
13 views

Add all post meta data to rest api

I am trying to get all meta fields to automatically add to the rest api. I've found a lot of tutorials that mostly deal with adding specific fields only, not all fields. In the wordpress docs I was ...
1
vote
0answers
26 views

How can I get the media inside a post?

I’m new to WordPress, so please forgive me if my question is not clear or vague. I did a lot of research, but I didn’t figure out how to do the trick. I’m developing a Xamarin application for Android ...
1
vote
0answers
19 views

Create or Update thousands of woocommerce products via PHP

I have client with a cash register in the store. That register has an API from which I'm retrieving over 5000 products and syncing them with online store. I wrote plugin that triggers cron job every ...
0
votes
0answers
15 views

Browser issue during use of woocommerce API

I have created a php page that updates a woocommerce catalog, using both the woocommerce API and the wordpress snippets (wp_update_posts etc). If I process 5 articles at a time, everything works fine. ...
0
votes
1answer
36 views

register/login api

I have been looking all over google and all I can find is fairly old plugins that appear outdated in assisting with an API registration/login. Basically, I have a mobile app that needs to get data ...
0
votes
0answers
226 views

WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”

I am attempting to connect Integromat to my WordPress install. I have successfully enabled visibility of custom post types in Integromat by registering my custom post types with show_in_rest. (And, ...
0
votes
0answers
18 views

I need some assistance opening a few videos in VLC on android automatically from my wordpress site

Im using a dropbox plugin for a few videos and want them to auto open in VLC on android. I just need to pre-pend the vlc:// protocol before the dropbox links. How can I accomplish this automatically ...
0
votes
1answer
18 views

Get text and images from other site

I have a site which is not WordPress, it usually gets input from user like Event name, event speakers, images etc. I want to create an event page in WordPress which contains all the details of events. ...
0
votes
1answer
23 views

how to create JSON array [] for REST response?

I am trying to create a REST response for a self-developed API in WordPress. The current code is $response = array(); $response[] = array( 'version' => '1.0', 'user' => ...
0
votes
0answers
10 views

Display Products section using an external API

I need to display the below sections in Wordpress website using another API: Products search Products listing with pagination Popular products Stores section Categories and sub-categories section ...
0
votes
0answers
24 views

Get non-rendered content from WP-API

I'd like to get the content of certain fields non-rendered, so for example get the excerpt text without WP adding the <p></p> tags. Is this possible without having to go into PHP, so just ...
0
votes
1answer
15 views

How do i post data to url with fields?

I am trying to post some data to a website called Jira and create a new issue there with the data I send. I did try it with postman and it works! But now I just need to implement this in code. So far, ...
0
votes
2answers
40 views

Ability to change homepage on Wordpress using API

Is there any way to change a site's homepage (Settings -> Reading), via API? We're running a React app with a Headless WP 'backend', and I'd like to let users change the homepage of their sites ...
0
votes
1answer
27 views

Is it possible to create new user from external form using REST API?

I created a new user (called external) in a WordPress site with manage users capabilites. I installed Application Passwords plugin to generate a token for that user. Now is it possibile to create a ...
0
votes
1answer
535 views

Sending posts from Python to WordPress

We are working on a platform that gets news from various sources and runs some NLP analysis on it. We have the backbone of the backend down, we're now trying to output our results on a feed. Since ...
0
votes
0answers
31 views

how to display dynamic data obtained from external sourced (API) within page content

I have a page that is passed a value as a query string parameter (www.example.com/uid=1234). I need to use that value to fetch some additional data via a 3rd party API and then display the fetched ...
0
votes
1answer
31 views

call funcution when clicking submit

I've built a WordPress plugin, this plugin has a form in front-end using a shortcode I need the submit button to do two things, first to send the entries to the database which I did it successfully. ...
2
votes
1answer
568 views

Can't use /wp-json/wp/v2/plugins API endpoint even as administrator

Using Basic Authentication as an Administrator, I am getting an error code 401 Unauthorized : [rest_cannot_view_plugins] Sorry, you are not allowed to manage plugins for this site. error when I ...
0
votes
0answers
25 views

Hook into the Admin Dashboard and redirect users

So I have a configuration that a API returns a ?code=..... to the URL inside my admin dashboard www.test.com/wp-admin. Is there a hook inside the admin where I can copy the admin url www.test.com/wp-...
0
votes
0answers
20 views

Obtain data returned from webhook

I connected a Wordpress instance with WooCommerce to a service that dispatches license codes using webhook called Subscription Created. Endpoint I'm sending data to also returns some data. I'd like to ...
0
votes
1answer
50 views

Update Customer JWT Woocommerce

I am using JWT to make call threw the woocommerce api. I created a kind of bot which is an admin user which I connect through JWT api to get a token. With the token at the moment I am doing calls to ...
0
votes
0answers
8 views

Opinion: Wordpress / Woocommerce API or actions and filters?

I was tasked to connect our Wordpress website / Woocommerce webstore with our new CRM Microsoft 365 Business Central regarding products, customers and orders. I started testing a basic connection ...
0
votes
1answer
19 views

Get /users/me details from Wordpress backend

Is there anyway to get the same details as /users/me api command but in WP backend? I have backend function that would get the user meta details custom api /user_meta public myFunc( $userId ) { $...
0
votes
0answers
53 views

mailchimp integration on a custom footer

I want the user to be able to opt-in to a MailChimp newsletter within a custom footer, which one. of our clients has asked for. The client also uses MailChimp so we therefore cannot use anything like ...
0
votes
1answer
24 views

Use a template for a specific url slug without creating a page

So, I'm grabbing a list of posts from one blog to another using the Wordpress API, I got the list of posts but now on click I would like to show the content of each individual post on my new website. ...
0
votes
0answers
19 views

Wordpress API single post

I'm grabbing a list of posts from Blog A to Blog B using the wordpress API, so far everything is fine, but how do I access the single post inside Blog B? How do I make it so when I access /blog/post-...
0
votes
0answers
271 views

WooCommerce - Change variable product image when only one attribute is selected

I'm aware that Woo questions are supposed to be off-topic here, but I've asked this question to WooCommerce support and they suggested that the only way to achieve what we're after is with custom ...
0
votes
0answers
49 views

How to integrate a 3rd party API into a search

I am new to using API calls in WordPress. I'm using a third-party application called Zype to manage video content, and I'm using their API to create a custom search query for the video content hosted ...
1
vote
0answers
199 views

Why does wp_remote_post returns an empty body response on certain endpoints?

Im gonna make this brief; Im using wp_remote_post to do a POST request to an external API. My local development environment looks something like "http://website.test". As of now I am ...
0
votes
0answers
23 views

Get JSON from API create with POSTMAN

I have to get JSON from a API created with Postman. It has a key. The structure of API it s very basic. It s something like this $_POST['clef_mic']; if ($_POST['clef_mic'] == 'password') { ***...

1
2 3 4 5
14