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
11 views

How to use external API content in place of WP posts using $wp_query?

I am trying to find a way to intercept the main $wp_query in order to use content from an external API in place of the local WordPress posts. This is a little more involved than similar questions I'...
0
votes
1answer
11 views

exclude particular category in api

How do I exclude a particular category in the API? For all categories - I may use the following: https://www.example.com/?rest_route=/wp/v2/posts&per_page=100 What if I need across all the ...
0
votes
0answers
12 views

Wordpress XMLRPC Advanced Custom Fields, Realtionship Field

I want to create new Wordpress posts with XMLRPC, I was able to edit the Realtionship field with his id only, I want to call the field with his title or other taxonomies. This is my code in python: ...
0
votes
0answers
10 views

Woocommerce API: Get product custom meta_data

I am trying to create products from a woocommerce website to another via the API (v2) and I want to send custom meta_data so I added these lines in the request: (the point is to create the product in ...
1
vote
0answers
23 views

Mixcloud FooterWidget api errors in Chrome and Safari but not Firefox?

I've tried contacting Mixcloud about this but they don't appear to support the FootWidget api as consider it to be experimental. I'm trying to incorporate this into a WP site and have managed to get ...
0
votes
0answers
6 views

How to insert element in Visualcomposer(VC)'s page structure json programmatically?

I have a requirement where I need to place a post inside a page in Wordpress. For this, I'm using a plugin Insert Pages, which inserts published post's content in another post or page using Shortcode ...
1
vote
2answers
30 views

Wordpress api call using wp-ajax returns error 400

I'm quite new to doing api calls using Wordpress so bear with me. I have this function: function foo() { $userinfo = [ "number" => "26246426", "secondnumber" => "43634643" ]; $...
0
votes
1answer
19 views

Creating a WordPress Post via REST API - HTML or Markdown?

When creating a post using the WordPress REST API, should the post body content include HTML or should the post body content be written in Markdown language? Or can it be either? I'm looking to ...
0
votes
0answers
27 views

WooCommerce REST API Capability

I have a main site with WooCommerce on it. I have a custom plugin (Remote Sites) that I want to have people register and purchase free product (No credit card) on. Is this possible via WooCommerce ...
0
votes
1answer
56 views

Need help in setting up a transient using API Key and if possible updating it in the ACF field

I am trying to set up a shortcode that will fetch Moz API data but I am facing issues. Sometimes, it returns values to 0, and sometimes it works. I don't know what I am doing wrong here. Might be I ...
0
votes
0answers
23 views

Integrate Google Client PHP API with WordPress?

I'm trying to integrate Google Drive API with my WordPress site as I want to list folders by their names not their IDs, I've found this link https://developers.google.com/drive/api/v3/quickstart/php ...
0
votes
0answers
15 views

How to use third-party SendGrid Email Validation API in Gravity Forms?

Please let me know how to use SendGrid Email Validation API in Gravity Forms, using gform_field_validation filter? Gravity Forms filter example: add_filter( 'gform_field_validation', function ( $...
0
votes
0answers
7 views

Woocommerce duplicate images on images rearrange via api

When images in product gallery are rearranged via the API in Woocommerce then duplicate images are created with the new order. The old ones are left there unattached and the Media folder gets bigger ...
0
votes
0answers
15 views

Woocommerce API REST search by multiple keywords

0 I am working on a page for search Woocommerce products with the REST API. But I have a question about how I can search on keywords. Product 1: Milkshake vanille / apple Product 2: Milkshake If I ...
0
votes
1answer
32 views

Create custom API endpoint to change custom header image

My goal is to create a custom API endpoint that I can call with an API call that changes the custom header image in Wordpress to another image (which would be passed along the API call, or maybe just ...
0
votes
1answer
9 views

WP Donation Form with custom payment API

I want to know if there's a plug-in out there which gives you the possibility to create a donation form and to use a custom payment gateway(not only Stripe,PayPal, etc). Thank you!
0
votes
0answers
29 views

How to fix,the rest api encountered an error

Site Health reporting: The REST API encountered an error(running php 7.3, wordpress 5.4.1,bluehost) Performance The REST API is one way WordPress, and other applications, communicate with the server....
0
votes
0answers
7 views

How can I allow my wordpress site to accept both Basic Auth and Oauth 2.0 via bearer token?

I can fetch entries using Bearer token from one my of my apps if the .htaccess file has the following lines in that specific order: RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) - [E=...
0
votes
1answer
19 views

Custom REST endpoint not working to retrieve single posts (“rest_no_route”)

I've got the following basic route for my custom REST endpoint: add_action('rest_api_init', 'my_cpt_route'); function my_cpt_route() { register_rest_route('mytheme/v1/', 'my_cpt', array( '...
0
votes
1answer
48 views

How to receive JSON payload from a digital device

I have a site with about 100 registered users. Some of the people will be receiving digital scales. The scales send their weight data to a 3rd party server that then sends a JSON Payload as an HTTP ...
0
votes
0answers
6 views

Rewrite URL and Query External API

I'd like to be able to visit a page on my website like website.com/advisor/advisor_id=1234, pass that ID to a function that queries a third party API, return the payload and rewrite my URL as website....
1
vote
1answer
18 views

How to modify WCMP Rest API response?

I had tried the register_rest_field() to modify the Rest API response of the WCMP plugin, but it seems that this function applies only to the default wordpress REST API (wp/v2). The purpose of ...
0
votes
0answers
31 views

rest_cannot_create_user

I tried to register a new user with Wordpress REST API, but I keep getting the error message responseText: "{"code":"rest_cannot_create_user","message":"Sorry, you are not allowed to create new ...
0
votes
0answers
18 views

Is update_post_meta used when save_post action hook is invoked?

Here, I have some code which applies some indexing operations on an external service (Algolia). My purpose, is to index posts in a similar way, as described in their API documentation. For that cause, ...
0
votes
0answers
47 views

Writing a middleware functions as a REST-API call

I'm new to wordpress. My usual stack is MERN stack. Currently I joined with a wordpress project and their we want to write some middleware function inside the wordpress project. The process is like ...
0
votes
0answers
10 views

How do I make a community website with updated local business listings and events from the internet?

I am trying to make a community website on wordpress. I want to inlude local business directory and events, but do not want to search myself and insert each listing or event. Is there a better way ...
1
vote
0answers
98 views

How to use JSON data from URL into table on my wordpress website

I want to display a data into table format on my wordpress website from the data available from below two JSON URL's https://corona.lmao.ninja/all https://corona.lmao.ninja/countries?sort={parameter} ...
1
vote
0answers
18 views

Database to page routing API?

Lets say I have in my database a table for Universities - and for each entry in the database, the primary key would be the name of the University, i.e Duke. If I created a template for all the ...
1
vote
0answers
11 views

Woocommerce api: create product with images - bad request

I am trying to create a product with images via the Woocommerce Rest API but I get bad request: Here is how I am preparing the images array: //IMAGES $images = []; //Get the featured image ...
0
votes
0answers
1k views

The REST API encountered an error in wordpress?

The REST API request failed due to an error. Error: [] cURL error 60: SSL certificate problem: certificate has expired
0
votes
1answer
45 views

How to get theme's info from wordpress.org/themes using api.wordpress.org?

i am trying to get the html code of the description of a few themes from WordPress, i know this is possible to achieve in codecanyon, but can't get the hang of it in wordpress.org, i've read the api....
1
vote
1answer
47 views

Adding custom end points, No error line

I have been trying to implement a custom end point that inserts data from my mobile application into this database. However, I cant seem to find the correct way to do it. Some places used #wpdp->...
0
votes
0answers
58 views

Tag appears empty when using API

I am able to query that the tag exists using: .com/wp-json/wp/v2/tags?slug= and in the response I see a link to: .com/tag/ and when I go to that link I see all of the posts with that tag. However when ...
0
votes
0answers
13 views

How to add google ads in AMP Project Contributors

I am talking about this amp plugin in particular: https://wordpress.org/plugins/amp/ I manage to add googleanalytics works fine because it had documentation: But how to add adwords code or whatever ...
0
votes
0answers
30 views

Filtering WooCommerce REST API response for a specific API key only?

I'm attempting to modify the WooCommerce REST API response with the woocommerce_rest_prepare_shop_order_object filter. I've got this working as intended. The only thing left is that I need to make it ...
0
votes
1answer
33 views

Wordpress API “code”:“rest_no_route” with Custom Route

I am attempting to start creating a custom endpoint for one of my sites, so I can pull in ACF fields to another. I have the following code in my theme's functions.php // register the endpoints ...
1
vote
0answers
37 views

How to send data from a form created by a plugin to an external API?

I need to send the form data created with a plug-in to an external API, would it be the case to write a plugin for this case? And if this type of function is viable, any tip for initiation is very ...
0
votes
0answers
29 views

Custom Registration and Updating Hidden Field After API Call

I created a custom registration form, one of the fields is being validated using a third party API. If the field passes validation later I update_user_meta. Currently if the field fails ...
0
votes
0answers
13 views

GraphQL API security concern

I am using a react Frontend with the WP GraphQL API How would I ensure that the GraphQL WP only returns the requests coming from my site? Is there a way to request a secret token for the requests, ...
0
votes
1answer
76 views

Third-Party API - PHP Fatal Errors Paired with http_request_failed / cURL error 28

We've developed an integration with a series of APIs provided by a third-party into a child-theme of Divi. In functions.php of that child-theme, we've created a series of functions for the purpose of ...
0
votes
0answers
68 views

Custom pages or Custom Posts

I am looking for a way to create custom pages, regarding the information that it holds on the WP CMS, I don't care about the layout, that will be handled separately. (To be clear, I want a custom page ...
0
votes
0answers
23 views

WordPress API - sign-up to multiple Multisites from one single form

Creating a sign-up form network multisite registration where the user can register to three different Multisites at the same time (and automatically new sub-sites are generated In three different ...
0
votes
1answer
336 views

Get total count of records in WP GraphQL API

I'm using this plugin to enable GQL API in WP. Unfortunately, according to this discussion, it's pretty limited and doesn't return total number of records for requested entity, e.g. list of users. ...
0
votes
0answers
23 views

is it possible to fetch data from a remote api while admin is writing a new post?

Editor picture: I wonder if it is possible to fetch data from a remote api while user is typing a new post inside the editor. That data should be shown anywhere in the screen (I mean, inside the ...
0
votes
0answers
20 views

Implementing URL JSON API Data into Website

I've recently been messing around with my own Game server, and I want to implement a status page on my website, so if the game Server ever goes down players have a place to go to find out what went ...
0
votes
1answer
50 views

I am trying to add current logged in user to my zoho chat

I am trying to get user info auto populated into the chat fields so logged in users don't have to type in their information everytime they want to chat with us. I cant seem to figure out how to make ...
0
votes
0answers
18 views

WordPress site that will integrate with external APIs

I would like to create an WordPress site that will integrate with external APIs and will take data by API from all the affiliates networks like https://www.offervault.com/ . Anyone can assist me and ...
0
votes
0answers
225 views

AJAX request from Chrome Extension to Wordpress Website

I developed a chrome extension which extract some data from the user visiting page and I want to transmit them to my database by an AJAX call (my website is a basic wordpress website). The point is ...
0
votes
0answers
40 views

WP REST API Create media return Timeout Gateway in response, but media created

Have a problem with REST API for creating media Trying post image to WordPress and got the good result – media created and Postman got response with id of the new image. But when I run request from ...
0
votes
1answer
21 views

Adding Amchart Interface to Wordpress API

I'm using the amchart wordpress plugin and want to add support for it via the wp rest API. Here's what I've done so far: in ../includes/setup.php (To $args array I've added: This will create the /...

1
2 3 4 5
13