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
0 answers
12 views

how to use nimble-API and Display data?

I want to get the contact resources displayed by doing Nimble API, but I do not know how these resources are displayed. How can I change the JSON code in PHP? [this is the link I check but can not ...
user avatar
  • 1
0 votes
1 answer
13 views

How to set category correctly for a custom post created by a remote API call?

I'm using a plugin - "cleverness-to-do-list" (https://wordpress.org/plugins/cleverness-to-do-list/#description ). I'm aware that the plugin is closed, but I've updated it at my end and ...
user avatar
  • 113
0 votes
0 answers
20 views

How to search by slug and old slug in single API

I need to search for wordpress posts with input slug or old slug only 1 parameter in single API. Now I'm using 2 url: 1. /wp-json/wp/v2/posts?slug=hello-world 2. /wp-json/wp/v2/posts?meta_key=...
user avatar
0 votes
0 answers
17 views

How To Save Data From Remote APIs To ACF?

I've been attempting to ingest remote data from an api partner into Wordpress. To data I've used wpallimport plugin, but it's quite limited. How would one connect with a remote api and then save the ...
user avatar
1 vote
0 answers
60 views

How to disable inline css styles generated by Gutenberg editor?

I've got Genesis-blocks plugin installed (it got updated from Atomic blocks). I am using blocks and resuable blocks to create pages. The problem I am facing is, most of these blocks inject their own ...
user avatar
  • 121
0 votes
0 answers
20 views

Pull in posts using post meta for REST API

So I wasn't able to find much detail about this, so I wanted to ask the community to see if I can get an answer. So let's say that I have the following: $this->global_endpoint = 'https://example....
user avatar
  • 1
0 votes
1 answer
25 views

How to set a template with wp_insert_post

I'm trying to set my template to the Elementor Canvas when using wp_insert_post but it isn't working. It is creating the new page fine but not using the canvas. What am I doing wrong? { "action&...
user avatar
0 votes
0 answers
26 views

Working Around rest_forbidden_context

I am trying to request page content, but the raw page content, calling this route: "/wp-json/wp/v2/pages/" + id + "?context=edit" In response to this I get: code: "...
user avatar
  • 101
0 votes
1 answer
37 views

WP Multisite - Additional subdomain on the site for API purposes

We have WP multisite network with WooCoomerce shops. All the network is served through Cloudflare CDN. Our ERP is accessing WooCommerce API of each website in the WP network. Since there so many, ...
user avatar
  • 21
0 votes
1 answer
22 views

Featured Image and Tags problem

I am very new to PHP and am having an issue with an amazing advanced Wordpress tutorial which showed how to use ACF and functions.php to scrape and import the data directly into my Animal Shelter ...
user avatar
0 votes
0 answers
95 views

Wordpress REST API - get custom taxonomy category posts

I want to use Wordpress REST API to get the posts that are inside a custom taxonomy created by the theme. The taxonomy is called "my_portfolio" but if I use this I have this response: {&...
user avatar
  • 1
0 votes
0 answers
13 views

How to display relations via wordpress Rest API

I have a CPT with relations i made and i need the relations to be sent via API Request. i edited it already so i can now see all meta fields in the API request but i cant get the relations to show. ...
user avatar
0 votes
2 answers
164 views

create timestamp links to jump to specific times on rumble videos

I am trying to allow visitors to seek specific times on the embed rumble video inside the wordpress post by clicking to timestamp links. I can do it for youtube videos using Skip to Timestamp plugin ...
user avatar
  • 101
0 votes
0 answers
22 views

Allow REST API Endpoint to specific user and hide from public

So I've been working on trying to figure this out, but I can't seem to get the right answer or even find docs online regarding this issue, so I'm reaching out to the community to see if I can get some ...
user avatar
  • 1
0 votes
0 answers
42 views

How to add Relations of a CCT from JetEngine via Wordpress Rest API

I am using JetEngine's Custom Content Types to share information from site A to site B. i have some simple meta fields (name, email) and set up Relations for another CCT i am using within Site A. When ...
user avatar
0 votes
0 answers
21 views

How to register dynamic settings in WordPress Customizer?

I have been experimenting with the Customizer JS API to create Panels, Sections, Settings and Controls in the Customizer. Till now, I have been using the PHP API but decided to try the JS API for the ...
user avatar
0 votes
0 answers
12 views

Wordpress API Create post content

I am basically trying to duplicate wordpress pages using the Wordpress API. I do get the page content using "GET /wp/v2/pages/" endpoint. I receive the the JSON data which includes: "...
user avatar
  • 1
0 votes
1 answer
42 views

cURL External API request displays content above other content on page

I've built a plugin to display our customer feedback on our WordPress website. We use an external feedback system called 'Customer Thermometer'. They have a simple API to use a URL to request stats ...
user avatar
1 vote
0 answers
16 views

For using google api is it necessary to install the google client libraries for using Oauth 2 in wordpress installation?

In a wordpress installation I am trying to fetch data from the search google console api. Seems I need Oauth 2.0 Is there some short code that I can use without installing all the libraries with ...
user avatar
0 votes
0 answers
35 views

Custom Endpoint - Does it possible to use PUT method with WP API Rest?

If I use the PUT method inside register_rest_route like this : add_action('rest_api_init', function () { register_rest_route( 'mydomain/v1', 'item/(?P<id>\d+)',array( 'methods' ...
user avatar
0 votes
0 answers
31 views

How to convert Currency from USD to other IP Based currency in Php function

I am trying to implement a feature on Paid Membership Pro Subscription plans that can automatically change the plan currency to user's IP Based local currency and price can also be converted ...
user avatar
0 votes
1 answer
43 views

Api rest_route 404 while building filter for custom posts (filtered by multiple meta keys / custom fields)

I am working in a WordPress site that has many custom post types, and extensive use of Advanced Custom Fields (ACF). The site also uses node modules, custom code from scratch, and Git in favor of a ...
user avatar
  • 107
0 votes
0 answers
72 views

Generate images with html2canvas and the woocommerce api

my question is a bit special and i dont know if my idea even works. I have a woocommerce shop where the products get imported via a CRM with the woocommerce API. Now I'm trying to create for each ...
user avatar
0 votes
0 answers
28 views

Creating a brand attribute as a variable

I have a script below where I dynamically need to replace two values and I can't get it to work. The values can be found as Wooccomerce product attribute values on the product page. For instance, see ...
user avatar
1 vote
0 answers
64 views

Create a range slider to change font-size with different screens sizes in wordpress customizer api

I have been trying to create a theme customizer to change the font size. To do that I have created settings and control. But the issue is I am unable to achieve like as shown in the image. I have used ...
user avatar
1 vote
0 answers
44 views

How to add AJAX in a custom PHP function using Google sheets API

I have followed a website link to fetch data from a SINGLE CELL of a Google sheet to a shortcode. And I am using that shortcode into the COUNTER widget in Elementor to achieve counting animation while ...
user avatar
0 votes
1 answer
34 views

How do I display PHP file contents on front end of Wordpress?

I am working with a third party API for events, the results of the GET request I've written are rendered/displayed at this URL (inside the SDK folder): https://example.com/skiddle-php-sdk-master/demo/...
user avatar
  • 1
0 votes
0 answers
98 views

How to queue API requests with PHP in WordPress?

I'm developing a plugin to manage some simple custom APIs. I'd like to handle clients requests to APIs with a queue, so as not to handle all requests in parallel but one at a time, with a FIFO logic: ...
user avatar
0 votes
0 answers
28 views

Get the name WordPress default theme in the core

With this link https://api.wordpress.org/core/version-check/1.7 I get the latest version of Wordpress, now I need: Get the name WordPress default theme in the core, twentytwentyone. how? I tried https:...
user avatar
0 votes
0 answers
53 views

How to store API authentication password?

I am connecting a WP site to a service through the service API. The API authentication of this service is done using the service account username and password, not API keys: You send a request to the ...
user avatar
  • 356
1 vote
1 answer
59 views

How send get request to external api with username and password

Actually i want to send get request to an api. the response is in xml. I have tried this <article> <div class="entry-content"> <?php $url = "XXXXXXX&...
user avatar
0 votes
0 answers
17 views

Get API auth_token token to renew weekly

I have a wordpress website that connects to experience.com api to get account stats and data. everything is working fine besides the auth_token needing to be renewed every 10 days. Right now it is all ...
user avatar
0 votes
0 answers
35 views

Wordpress and API (rapidapi) request

I need assistance with the following problem: I would like to trigger a transaction from a wordpress page. A special, but not yet functioning page template was built for this (see next page). There ...
user avatar
0 votes
1 answer
199 views

How to change the date and time in REST API for comments?

/** * Add a Formatted Date to the WordPress REST API JSON Post Object * */ add_action('rest_api_init', function() { register_rest_field( array('comment'), 'formatted_date', ...
user avatar
  • 287
0 votes
0 answers
33 views

apiFetch() returns infinite requests

In PHP I created a a simple endpoint to return an array of custom post type names: // Create array of custom post types function custom_get_post_types( $data ) { $args = array( 'public' =&...
user avatar
  • 291
0 votes
0 answers
149 views

Sync posts via JSON API

We have a custom post type Events on our Wordpress website. Every event has a title, description and date. From our CRM-system, we can create a JSON feed where we list all Events. Every event in the ...
user avatar
0 votes
0 answers
26 views

Solution for processing lots of data with CRON/API, dealing with memory/timeout issues

Using a custom CRON job set up in my Wordpress site I am connecting to an external API to refresh some data. The API only allows for a certain amount of records to be read at a time so I have to "...
user avatar
  • 396
0 votes
0 answers
230 views

Wordpress Woocommerce REST API JSON Error

I have a problem with Rest Api, I am using Automattic Woocommerce Rest Api to search categories, I am getting this error: PHP Fatal error: Uncaught Automattic\WooCommerce\HttpClient\...
user avatar
0 votes
1 answer
42 views

Integrating boxtal PHP library into a custom WordPress Plugin

I need to integrate this PHP library on my WordPress site. I read that you have to create a plugin or integrate it into the child theme. So I created a plugin and integrated the PHP library in the ...
user avatar
0 votes
1 answer
447 views

WP REST API remove the Wordpress shortcodes from the JSON wp/v2/posts content->rendered

I'm trying to get rid of the shortcodes that wordpress gives me when i use the WP REST API. I already managed to remove the HTML tags by editing the class-wp-rest-posts-controller.php by using ...
user avatar
0 votes
0 answers
214 views

Post content in wp_remote_post

I'm trying to post content with wp_remote_post. Content that I want to be posted is in a separate php file, which echo's block with html and WPBakery shortcode. I tried include but it didn't work, I ...
user avatar
  • 1
0 votes
1 answer
120 views

Push Contact form 7 variable to front end after submission

I have a contact form 7 form that's sending information to an API. I want to display the API response on the front end. I record the user information, then post it using wp_remote_post, with my ...
user avatar
  • 11
2 votes
1 answer
179 views

Programmatically trigger the gutenberg save

I have a load of data as JSON that I am trying to save into a fresh install of WordPress. I am using puppeteer to log into and create each page, and wp.blocks.createBlock to programmatically create ...
user avatar
  • 254
1 vote
0 answers
49 views

Make parts of your wordpress website completely built with data from external APIs?

I have experience with building frontends with react.js that use external data from RESTful APIs (from a headless CMS). Now I have someone ask me if I could build a wordpress website that has several ...
user avatar
  • 11
1 vote
1 answer
101 views

woocommerce registration form with klaviyo(don't work with current user)

I'm trying to integrate klaviyo with woocom form, this is the code I added below. The issue is when I add any hardcoded email in variable $emailUntrim = "xyzxyz@gmail.com" instead of $...
user avatar
0 votes
0 answers
132 views

Call external API based on user input

I want to create a WordPress website in which I want to display a search box on a page, where the user will be able to search for tracking numbers from different companies. On searching a string in ...
user avatar
0 votes
0 answers
64 views

WordPress API causing fatal error

I can't seem to figure out why my API call is failing when trying to filter the fields using _fields. It seems to work all but one of the fields, when I add it, it dies with "There has been a ...
user avatar
  • 111
0 votes
1 answer
44 views

How to pass the API key to the client from the database? [closed]

I wrote this simple client in javascript that uses mapbox geocoding API. It is not necessary to hide the API key but what is the correct way of giving that js file access to the API key without ...
user avatar
  • 1
0 votes
0 answers
20 views

WP API v2 POST adds records multiple times

Been trying to add POSTS using the WP API. Although the records get added 3-4 times. I am looping through an XML file and executing the post using CURL. I don't see a reason why posts are added 3-4 ...
user avatar
  • 1
1 vote
0 answers
18 views

Wordpress Google Calendar Oath 404

I am trying to integrate google calendar with a wordpress plugin. As per the google api documentation I am authorizing using google oauth2. When it returns the code and scope in the url the scope part ...
user avatar

1
2 3 4 5
15