Questions tagged [wordpress-rest-api]
The WordPress REST API
wordpress-rest-api
1,603
questions
0
votes
0
answers
45
views
WP Rest API to upload image with URL : Operation timed out after XXXX milliseconds with 0 bytes received
I want to upload pictures to the gallery of my WordPress via REST API. I use this function :
function upload_image_to_woocommerce($image_path)
{
global $url;
global $apiCredential;
$...
0
votes
0
answers
7
views
Test wp.data with Jest in Block Plugin
I am trying to get my head around testing my Wordpress Block Plugin with Jest. I am specifically struggling how to mock calls to wp.data.
See the following function:
import apiFetch from '@wordpress/...
0
votes
0
answers
14
views
How to allow some customers to bypass the website .htaccess
My website www.attractionsofchina.com a strict .htaccess file, that blocks countries like Russia or vietnam. Some of my clients, may - on occasion - travel to such countries.
What is the easiest/...
0
votes
0
answers
22
views
How to Connect My Domain to a Locally Hosted WordPress Site on XAMPP and Enable Secure Application Passwords? [closed]
I've set up a mini PC running Windows 11 that stays on 24/7. On this PC, I've installed XAMPP with Apache and changed the Apache port from 80 to 8080. I've also got WordPress up and running in the ...
0
votes
0
answers
16
views
Custom rewrite rules for CPT
I have a "place" CPT with URLS like /places/name
I would like to add a custom page for every CPT with the format function
custom_rewrite_rule() {
add_rewrite_rule("^place/([^/]+)/...
0
votes
0
answers
14
views
Local react app returning 404 - Cannot get /
I've built a react front end application that draws data from a Wordpress site via the WP REST API. It was working great for weeks, but I messed with my webpack config and package.json to try to get ...
-1
votes
0
answers
19
views
Redirect in php Codex [duplicate]
Good morning. I have a problem with a plugin made on the codex php of wordpres, that contains a list of forms and a form field to update/insert a new one.
The readdress to the list page after an ...
0
votes
0
answers
19
views
can't get image from wordpress rest api in flutter
i want to fetch the image of my products in my flutter app ...
but i cant it show me this weird error and i don't know what is it for?
and this is my code ( exactly based on a tutorial that worked ...
0
votes
0
answers
19
views
Retrieving Deleted Scheduled Posts via WordPress REST API
I've been using a Python script to fetch and modify posting day of scheduled posts in WordPress via the REST API with the following URL:https://{domain}/wp-json/wp/v2/posts?per_page=100&...
0
votes
1
answer
48
views
Get rendered HTML block template from Post
I'm not new to WordPress but I have a question for the gutenberg api.
I want to get a single post by id with the rendered post template for this ID. But I don't know how to archieve this problem ...
0
votes
1
answer
32
views
how to show api data in wordpress?
I want a plugin to receive a nested json file from a url and display its information in the form of paged cards with ajax search capability.
Is there such a plugin?
I tested the wpDataTable plugin, ...
0
votes
1
answer
33
views
Why do I get a 403 error when requesting the WordPress API from a Laravel application hosted on Azure App Service?
I have a Laravel application hosted on Azure App Service. When my Laravel app tries to fetch data from the WordPress API, it receives a 403 Forbidden error. Here are some key details:
WordPress API ...
1
vote
1
answer
67
views
401 Error when trying to delete image via REST API Woocommerce
So I am trying to delete the product along with the images via REST API but it deletes everything EXCEPT the images. I've tested it separately to delete an image but it give me this error:
{"...
0
votes
1
answer
28
views
How to update a wordpress page from .NET Core
I have downloaded the WordPressPCL example project in https://github.com/wp-net/WordPressPCL.
What I need is to update a page or post of Wordpress but I don't find any example.
All I find are examples ...
0
votes
0
answers
31
views
How do I record a discount and a coupon for API orders on the WP Admin backend
So I realized that when using WooCommerce REST API to create orders, the discount_total parameter shows the discount amount (which is probably calculated by subtracting the line_items['total'] value ...