Questions tagged [wordpress-rest-api]

The WordPress REST API

0
votes
0answers
4 views

Attempting to pass a returned value to WP's rest_ensure_response()

This is probably a PHP fundamental, so apologise if I'm stupid in advance. I'm building a simple plugin for Wordpress which accesses wp_head, grabs the code block (scripts and styles) and then ...
0
votes
0answers
5 views

wordpress rest API comment meta

We are using the Wordpress REST API and Woocomerce REST API to get shop content in the application. I want to get product rating. I use this url:wp-json/wp/v2/comments?post=3989 the respons is: [{ ...
0
votes
1answer
27 views

Not Seeing All The Post Objects?

The code below pull from wordpress website via the REST API, however there's one major problem with it: It's seeing 10 posts out of 98. I should see all 98 shouldn't I ? Since I'm using a flatlist ...
0
votes
1answer
16 views

WooCommerce REST API GET multiple products by ID

I need to display all related products by eah product I have in my list. Eg, In my app I have 3 products with id 1, 2, 3 product id 1 has 5,6,7 as related, product id 2 with related 8 and 9 etc.. ...
0
votes
1answer
16 views

Search Unique Tag Name

I have one array of tags and need to check if the tag already exists in database. The below code works well, however , queryBuilder.Search = t[i].Name works the same way as the LIKE in SQL. I mean, ...
0
votes
0answers
13 views

woocommerce_rest_cannot_create“, message(”Sorry, you are not allowed to create resources)

I am developing a IONIC3 app using woocommerce rest api. GET request is working succesfully but POST,DELETE AND PUT request providing 401 error with code{woocommerce_rest_cannot_create", message: "...
0
votes
0answers
17 views

How will I create woocommerce order programmatically in Woocommerce?

I am writing a php json service for mobile app with my Wordpress/Woocommerce site. I have to create an order of bookable hotels which have checkin and checkout date. How will place an order ...
-1
votes
0answers
13 views

Repeater Custom Field Returning Empty Array When You Try To Integrate it to the REST API

I have a custom field 'USER'. It has a field called 'facebook' and a repeater field called 'books' which contains 2 subfields, 'book_img' and 'book_url' I can easily integrate the field facebook ...
-1
votes
0answers
16 views

how to implement restkit into project using swift 3

i want to use restkit for wordpress rest API, i have done this code but still this code not working reference me any demo according to restkit, restkit use for both swift 3 and objective c func ...
-2
votes
0answers
9 views

Create Plugin in Wordpress get all my plugin Users post Details

I want Create a new Wordpress plugin for manage my plugin users post details Example more than 100 people using my plugin i want get all 100 people post record
0
votes
1answer
37 views

Show title and featured image from WordPress REST API with React Native

I'm trying to get the titles and featured images from several pages that are included in a JSON response. After searching for a while and trying something, I'm getting stuck on displaying the required ...
0
votes
1answer
67 views
+100

Woocommerce API - Create Order With Float Quantity

Unfortunately, in my store all of the product quantities are in float. I used the below code to accept float value as a quantity in my website. // Removes the WooCommerce filter, that is validating ...
0
votes
0answers
14 views

Wordpress OAuth2 RestAPI

hello i am using wordpress in a woocommerce project i wanna to active oauth2 for sending requests via rest api for mobile i follow much tuts but no one helped i setuped plugin called oauth server but ...
0
votes
0answers
14 views

Module build failed: SyntaxError: Unexpected token on npm run build

Trying to set up the ReactJS Script described in the Blog: Specifically the file celestial/src/index.jsx: import React from 'react'; import { render } from 'react-dom'; import { BrowserRouter as ...
0
votes
0answers
8 views

Is it possible to return a user with specific custom field data

I am using WP REST API integration version v2 to get data from my shop. If I am executing /wp-json/wc/v2/customers?email=xxx I am getting correct JSON reply, with only one user and its details. If ...
0
votes
0answers
27 views

Geocoder failed due to: REQUEST_DENIED [closed]

Currently i'm facing request denied error in my website. When i'm use current location feature it show's Geocoder failed due to: REQUEST_DENIED. How to solve this error?
1
vote
1answer
17 views

WordPress API Access sub-pages

I have created a blog on Wordpress.com, I can access the api and returned posts from the homepage with this: https://public-api.wordpress.com/rest/v1/sites/{siteID}/ So my blog is access via URL at ...
5
votes
2answers
122 views
+200

How to get and display Wordpress featured media and author image?

I am creating an android app that displays WordPress posts. At the moment, the app is displaying the title and subtitle (3 lines of text) but, it doesn't show the featured image. I also would love to ...
0
votes
0answers
14 views

WordPress REST API reacts poorly when attempting to publish code snippets. Expertise needed

I've been struggling with a strange bug for the past couple of days. Basically, I'm using the REST API to create and update pages and posts on a WordPress website. The content being published includes ...
0
votes
0answers
17 views

WordPress “REST API” - Render VisualComposer Content Not Working

I have used the below code but it's not working properly, custom heading and single image short code is showing in app. Can any one help me out how to fix my issue. Thank you. add_action( '...
0
votes
0answers
17 views

Wordpress ADD FIELD to WP_POST

I have a website made with Wordpress with more than 100.000 post. The primary search works correctly, but when carried out on the custom fields it is extremely slow. The only solution is to include ...
0
votes
0answers
19 views

showing each category separately

I am trying to show my wordpress site each posts category seprately by using wordpress rest Api i tried this /wp-json/wp/v2/posts/?world but everytime it does not get filter just shows all post on ...
0
votes
0answers
23 views

gatsby-source-wordpress: localFile field null on images in ACF fields on netlify deploy

I'm using the gatsby wordpress plugin to retrieve my posts from my hosted WP site. Locally, gatsby build works fine and all my ACF fields are retrieved. However, on my Netlify deploy the property ...
0
votes
0answers
27 views

Wordpress hook fires before, not after the call

What I'm triyng to achieve is working with the WP REST API and hooking the user meta data update. Here's the link to the action reference: https://codex.wordpress.org/Plugin_API/Action_Reference/...
0
votes
0answers
13 views

Filter by month with the Wordpress Backbone JS API

The docs are very sparse, but here https://v2.wp-api.org/extending/javascript-client/ the example shows: use filter to change the order & orderby options: postsCollection.fetch( { data: { '...
0
votes
0answers
26 views

Why can't I access the query params from WP_REST_Request?

On my blog, I'm trying to create an endpoint in order to load more articles using ajax. However, the query string parameters don't seem to be passed down to my function. Here's my code, all of it is ...
0
votes
1answer
11 views

Authorization header malformed WP JWT Authentication for WP REST API

I have managed to get the token using user and pass and now I am passing the token using this ajax call in order to create a new post , like this : $.ajax({ url: "http://apibind.com/wp/wp-...
0
votes
1answer
39 views

Filtering WordPress API with Angular pipe?

Currently trying to use a custom pipe to filter my *ngFor list items to toggle posts with a comment status of opened or closed. Seem to have run into a snag on setting it up. Code is as follows: app....
-4
votes
0answers
14 views

Wordpress website transfer to apache server,now all the inner links show 404 error

I have transferred my website to a subdomain that is hosted on apache, all my site inner links show 404 error here is the site link: http://shopfoodex.neutrinodesign.com
0
votes
1answer
26 views

Wordpress giving 404 error for all pages except home page

I'm using wordpress for my project and everything works fine in the local and when I deploy that folder in the server home page is working perfect but when I click any link or navigate to any other ...
0
votes
0answers
10 views

Add a meta field query to custom WordPress REST API endpoint

I have written a custom endpoint to my WordPress REST API by registering with code below: register_rest_route( 'v1/app', '/matches(?:/(?P<id>\d+))?', array( array( // By ...
0
votes
0answers
26 views

Get current logged in user ID through WP/WC API

I am currently working on Dashboard application made with Django which pulls data from a Wordpress/Woocommerce website through WC/WP API and stores it in a PostgreSQL database. In a part of the ...
0
votes
1answer
16 views

Access to all content with specific post type (Wordpress)

I had a question about Wordpress + rest api, I use register_rest_route for adding new end-point for my collection, and I also created a plugin named as 'article', and the type of this post type also ...
0
votes
0answers
14 views

WP Rest API custom endpoint post not returning response header

I am using ionic 3 framework and I want to fetch some data from services post type in wordpress. This is my custom endpoint in my wordpress. <?php add_action( 'rest_api_init', function () { ...
0
votes
1answer
20 views

Call wordpress plugin methods from functions file

I'm looking to utilize the woocommerce paypal pro plugin in some rest API calls, in my theme's functions.php file. The goal would be to get the constructed html form in one call, and process payment ...
0
votes
1answer
18 views

Assign new user programmatically to the group defined in Wordpress

My goal is to assign programmatically a new user to the group (Posts->Categories) defined in Wordpress. I want to achieve it by Wordpress REST API or directly modifying database table. Looking on ...
0
votes
0answers
12 views

Is it more efficient for a social network to have individual content tables, or a single POSTS table?

We are in the middle of hiring our first developer who swears by using wordpress's rest API and database structure for back-end (angular front-end), and that it's the fastest and most efficient to ...
-1
votes
1answer
28 views

wordpress rest api taxonomy return only 10

When I try to list terms from taxonomy with wp rest api i get only 10 items. eg. my-domain.io/wp-json/wp/v2/my_taxonomy/? In php, with get_terms('my_taxonomy'), i get all terms from this taxonomy. ...
0
votes
0answers
11 views

Create wordpress rest-api to do 3rd party plugin related tasks

I am working with 'contest-gallery' wordpress plugin. But I want to create an API end point to do the tasks that is doing by the plugin. Is there any wordpress plugin to do this kind of tasks ? If I ...
2
votes
0answers
32 views

Wordpress Rest Api How do I call the next 10 posts when scrollview ends?

In my Android app, Wordpress Rest api is only calling 10 posts. When I move to the end of the screen I want to call the next 10 more posts. And when it comes to the end of it, I want to call the 10 ...
0
votes
2answers
95 views

WooCommerce REST API “woocommerce_rest_cannot_view ”

when i paste this link http://localhost/wordpress/wp-json/wc/v2/products?consumer_key=ck_*******************&consumer_secret=cs_******************** it show for me this error message {"code"...
0
votes
0answers
24 views

Post request in contact form 7 WordPress

I'm using wp-rest-api v2 and contact form 7 in Website and planning to receive information through contact form 7 route from an app. For initial test, I'm using postman. I'm sending POST request to ...
0
votes
0answers
49 views

Selective CORS?

I'm placing the following request to a site through the javascript Node WP API (wp.posts().after() call) and I get a list of posts https://site/wp-json/wp/v2/posts?after=2018-07-31T16%3A56%3A29.225Z&...
-1
votes
0answers
14 views

Updating specific content blocks on page with Wordpress rest api

Im new to wordpress really first of all so cut me some slack. ha. Well the issue is i am trying to migrate alot of sites i have on another cms. I get the output of the old site in an xml file with ...
0
votes
1answer
35 views

Wordpress REST API - send reset password link

I want to create a request from my application. (iOS and Android - Coded with Xamarin). Explaination: The request should trigger the WordPress action=lostpassword. - The user receives an email to ...
1
vote
0answers
43 views

insert data in WordPress database as non-logged in user

I created a custom post type called 'visitor'. and I have an input in the front end. when the user saves input, I want to grab that data and post it as 'title' in my 'visitor' post type. in functions....
0
votes
0answers
52 views

Woocommerce remove_cart_item not removing items when logged in

Playing around with woocommerce, trying to call remove item in a custom api implementation. I can successfully get a list of cart items and add items to the cart in similar fashion. Yet, despite the ...
0
votes
1answer
23 views

Wordpress WooCommerce Rest-API override item schema

I'm trying to use WooCommerce with fractional stock quantities with the plugin [Quantities and Units for WooCommerce][1] and it works pretty good. My only Problem is, that the WooCommerce API rejects ...
0
votes
0answers
9 views

WP-API: Unique section for unique component

I am creating an app react with as back end wordpress rest API. All the contents of the site must be able to be modified through the CMS in several languges. So I'm looking for a way to create Custom ...
-1
votes
1answer
24 views

when i display my wordpress website post on other php script which resides in the same directory

It is not Displaying it and when enable ERROR REPORTING to Check Issue it Show me Fatal error: Cannot redeclare clean_url() (previously declared in /home/a107853262/public_html/TECHNICALLY-SPEAKING....