Querying external APIs with XML data using WordPress

TechiePress December 20, 2022
Video Thumbnail
TechiePress Logo

TechiePress

View Channel

About

This channel is mainly about coding solutions to every day challenges. The base software used is WordPress/ClassicPress, Woocommerce and other plugins explained simply. Most examples will use PHP, HTML, CSS and JavaScript (React JS, Vue JS and Vanilla JS). If you need to reach me for business, email me on web @ mediauganda [dot] com. Kindly leave a comment, feedback or even a like. Please don't forget to share the videos if they have helped you in one way or the other.

Video Description

Welcome to part 4 of our series on querying external APIs with XML data using WordPress! In this video, we'll be learning how to use recommended and native WordPress methods like wp_remote_post() to make API requests. We'll start off by discussing the requirements for this tutorial, and then we'll delve into XML and SOAP in WordPress. From there, we'll take a look at the WordPress HTTP Requests class and its various methods. We'll also be using Postman to make API query requests, and then we'll move on to making an external WordPress API XML request. Along the way, we'll use error_log to debug in WordPress and learn how to get the WordPress API request response body. Finally, we'll wrap up the video by converting an XML string to JSON in PHP and then converting that JSON string to a PHP array. Thanks for watching! VIDEO CHAPTERS 00:00 Intro & Requirements 01:52 XML & SOAP in WordPress 02:34 WordPress HTTP Requests Class & methods 04:57 Using Postman for API query requests 07:27 External WordPress API XML Request 12:24 Using error_log to debug in WordPress 14:31 Getting WordPress API request response body 15:17 Convert XML string to JSON in PHP 16:43 Convert JSON string to PHP array 17:43 Conclusion Code sample: https://github.com/YTTechiePress/techiepress-domain-searcher/tree/4-domain-response HOW TO SUPPORT THE CHANNEL ============================================= Do you like what I am doing? - Buy me a coffee through https://www.buymeacoffee.com/techiepress - Give via PayPal: https://paypal.me/laurencebahiirwa - Visit https://omukiguy.com/support-my-work/ I am social too: Facebook: https://web.facebook.com/TechiePress-100149655032583/ Twitter: https://twitter.com/omukiguy Blog & Newsletter: https://omukiguy.com Github: https://github.com/yttechiepress ------------------------------------------------------------------------------- LEARN MORE IN THE WELL CURATED PLAYLISTS BELOW -------------------------------------------------------------------------------- Learn how to build a plugin from scratch: https://youtu.be/9LtXEMRNln8?t=145 WooCommerce E-Commerce customizations == Build Free Custom E-commerce Online Shop using WooCommerce - https://www.youtube.com/playlist?list=PLNqG1qGUllk2qFmbexV2SikF8bXqvDW-H == Build Free Custom Theme for E-commerce Online Shop using WooCommerce - https://www.youtube.com/playlist?list=PLNqG1qGUllk0uFqUvFFIJ67dSNBKapd7Y ====== Build Dynamic Websites with Elementor ====== == Learn the Elementor basics - https://www.youtube.com/playlist?list=PLNqG1qGUllk27BK71LBJDw4auOl-aVOqG == Build a custom Elementor Widget from Scratch - https://www.youtube.com/playlist?list=PLNqG1qGUllk2pukgHP385ll0ENmRr9E_M ====== How to use WordPress Gutenberg Block Editor ====== WordPress 5.4 Gutenberg Blocks Updates == https://www.youtube.com/playlist?list=PLNqG1qGUllk0lI2Omhvp54Qn9-MIEhQzX WordPress Gutenberg blocks for Designers == https://www.youtube.com/playlist?list=PLNqG1qGUllk3DY91Bq_26L8meIXM_Uo4E Gutenberg WordPress Block Editor tutorials for beginners == https://www.youtube.com/playlist?list=PLNqG1qGUllk2xOKt79aI12GgX2DX0aNx- Custom WooCommerce Gateway Development from Scratch == https://www.youtube.com/playlist?list=PLNqG1qGUllk21IES6ZJ2WkX1BcbPQF4-7 WordPress Custom REST API Namespaces, Endpoints and Examples from Scratch == https://www.youtube.com/playlist?list=PLNqG1qGUllk0npc2ZGPU358Q6S1itFCYR ====== WordPress Plugin Development from Scratch ====== Build Most Popular & Most Commented Post Plugin == https://www.youtube.com/playlist?list=PLNqG1qGUllk05gUz_VB5nCHEN9A3OpS94 Build SMS Plugin with External WordPress API Integration using custom WordPress Databases == https://www.youtube.com/playlist?list=PLNqG1qGUllk0NSTrNF2xa1zHNzMi3M7su WordPress External APIs Integration Plugin Development == https://www.youtube.com/playlist?list=PLNqG1qGUllk0U2-5ZBNxSNxQrPO-4CqnR Convert WordPress to mobile App in Headless WordPress == Convert WordPress Sports Website into Mobile Application - https://www.youtube.com/playlist?list=PLNqG1qGUllk3qMrJcXUeP1Ge5U4fKtAR Make GraphQL API endpoints with WordPress Headless CMS WPGraphQL Plugin == https://www.youtube.com/playlist?list=PLNqG1qGUllk03llIgPYGVTwY14lAPDkBp Customize Your WordPress & ClassicPress == Build Custom REST API Endpoints with WordPress or ClassicPress - https://www.youtube.com/playlist?list=PLNqG1qGUllk06KZP9N1nRG-FpnTr_TD9u Custom Dashboard Widgets == https://www.youtube.com/playlist?list=PLNqG1qGUllk2h51557gV74x8p1RrlEmah Build Custom Admin == https://www.youtube.com/playlist?list=PLNqG1qGUllk1M5L8Xo-K1g6B3OrkliKDs Learn Git == Git tutorial for writers + software developers for beginners - https://www.youtube.com/playlist?list=PLNqG1qGUllk2PnSJiUw1SCjiS6pNhIR2f

You May Also Like

Upgrade Your Gear with These Top Camera Bags

AI-recommended products based on this video

Loading...
Bagtopia Puffer Tote Bag, Large Quilted Puffer Bag, Lightweight Puffy Quilted Hobo Bag, Soft Shoulder Bag for Work,Gym,Travel

Bagtopia Puffer Tote Bag, Large Quilted Puffer Bag, Lightweight Puffy Quilted Hobo Bag, Soft Shoulder Bag for Work,Gym,Travel

(94)
$34.99
FREE delivery Sat, Jun 14 on your first order
Loading...
RAINSMORE Large Sling Bag for Men Lightweight Waterproof Crossbody Bag Travel Hiking Bag Chest Bag Sling Backpack for Cycling Sport

RAINSMORE Large Sling Bag for Men Lightweight Waterproof Crossbody Bag Travel Hiking Bag Chest Bag Sling Backpack for Cycling Sport

(79)
$31.99
FREE delivery Thu, Jun 19 on your first order
50+ bought in past month
Loading...
FADEON Large Crossbody Bag for Women Crossbody Purse, Leather Cross Body Purses Multi Pocket Roomy Shoulder Bag

FADEON Large Crossbody Bag for Women Crossbody Purse, Leather Cross Body Purses Multi Pocket Roomy Shoulder Bag

(1,122)
$53.99
PrimeFREE delivery Sat, Jun 14
Loading...
RAINSMORE Laptop Bag for Women 15.6 inch Laptop Tote Bag Leather Large Capacity Work Tote Bag Waterproof Business Office Computer Bag Women Travel Handbag Shoulder Bag, Pink

RAINSMORE Laptop Bag for Women 15.6 inch Laptop Tote Bag Leather Large Capacity Work Tote Bag Waterproof Business Office Computer Bag Women Travel Handbag Shoulder Bag, Pink

(397)
$49.99
PrimeFREE delivery Sat, Jun 14
Loading...
Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

(3,371)
$13.99
FREE delivery Sat, Sep 20 on your first order
Loading...
HATALKIN Case Compatible with Apple AirTags Case Keychain Air tag Holder Air Tag Key Ring Cases Air Tags Protective Cover Airtag Key Chain Loop Holders Silicone for Luggage Dog Cat Pet Collar 4 Pack

HATALKIN Case Compatible with Apple AirTags Case Keychain Air tag Holder Air Tag Key Ring Cases Air Tags Protective Cover Airtag Key Chain Loop Holders Silicone for Luggage Dog Cat Pet Collar 4 Pack

(19,279)
$9.78
FREE delivery Mon, Aug 25 on your first order
1K+ bought in past month
Loading...
Spigen Case for iPhone 16 Case, Liquid Air Armor Designed for Apple iPhone 16 - Matte Black

Spigen Case for iPhone 16 Case, Liquid Air Armor Designed for Apple iPhone 16 - Matte Black

(2,445)
$15.99$15.17
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
EooCoo Compatible with MacBook Air 15 inch Case 2025 2024 2023 Release M4 A3241 M3 A3114 M2 A2941 Liquid Retina Display, Plastic Hard Shell Case + Keyboard Cover + Screen Protector, Crystal Clear Global Recycled Standard

EooCoo Compatible with MacBook Air 15 inch Case 2025 2024 2023 Release M4 A3241 M3 A3114 M2 A2941 Liquid Retina Display, Plastic Hard Shell Case + Keyboard Cover + Screen Protector, Crystal Clear Global Recycled Standard

(1,903)
$22.95
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
koolehaoda L Shape Camera Bracket, Video Vertical Shooting Quick Release Plate L Stand Arca Swiss Compatible for Tripod Head Ballhead DSLR Camera

koolehaoda L Shape Camera Bracket, Video Vertical Shooting Quick Release Plate L Stand Arca Swiss Compatible for Tripod Head Ballhead DSLR Camera

(87)
$23.98
FREE delivery Thu, Jun 19 on your first order
Loading...
Ball Head Manbily Tripod Head Metal Aluminum Body 360° Panoramic Monopod Head with Extra Arca Swiss Quick Release Plate, Load up to 17.6lbs/8kg,Camera Head for DSLR, Camcorder, Slider (Red)

Ball Head Manbily Tripod Head Metal Aluminum Body 360° Panoramic Monopod Head with Extra Arca Swiss Quick Release Plate, Load up to 17.6lbs/8kg,Camera Head for DSLR, Camcorder, Slider (Red)

(274)
$85.26$77.52
FREE delivery Jun 17 - 19Only 10 left in stock.
Loading...
Phone Mount for Tripod, Adjustable Phone Tripod Mount with Cold Shoe & Arca Swiss Quick Release Plate,Universal Adjustable Clamp Suitable for iPhone 14 pro/13 Pro/12/11/Samsung

Phone Mount for Tripod, Adjustable Phone Tripod Mount with Cold Shoe & Arca Swiss Quick Release Plate,Universal Adjustable Clamp Suitable for iPhone 14 pro/13 Pro/12/11/Samsung

(394)
$48.12$43.08
FREE delivery Jun 18 - 20
Loading...
NEEWER a6700 L Plate Compatible with Sony Alpha 6700, Quick Switch Aluminum Extendable Side Plate & Anti Twist Baseplate Compatible with Arca Swiss QR System DJI RS 2 RSC 2 RS 3 Pro Gimbals, CA048

NEEWER a6700 L Plate Compatible with Sony Alpha 6700, Quick Switch Aluminum Extendable Side Plate & Anti Twist Baseplate Compatible with Arca Swiss QR System DJI RS 2 RSC 2 RS 3 Pro Gimbals, CA048

(24)
$25.99
FREE delivery Thu, Jun 19 on your first order
Loading...
Kaiess 62" Tripod for iPhone, Selfie Stick Tripod & Phone Tripod Stand with Remote, Cell Phone Tripod for iPhone, Extendable Travel Tripod Compatible with iPhone 14/13/12 Pro Max/Android
Best Seller

Kaiess 62" Tripod for iPhone, Selfie Stick Tripod & Phone Tripod Stand with Remote, Cell Phone Tripod for iPhone, Extendable Travel Tripod Compatible with iPhone 14/13/12 Pro Max/Android

(5,298)
$28.98
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

(3)
$44.99
FREE delivery Thu, Jun 19
Loading...
SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

(85)
$38.24
FREE delivery Thu, Jun 19
Loading...
NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

(2,807)
$181.49
FREE delivery Sun, Aug 10
Loading...
NEEWER Zf Handgrip L Shape Grip for Nikon Z f, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle & Aluminum Shutter Button Cap, Compatible with Arca Swiss Tripod Fluid Head, CA073

NEEWER Zf Handgrip L Shape Grip for Nikon Z f, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle & Aluminum Shutter Button Cap, Compatible with Arca Swiss Tripod Fluid Head, CA073

(236)
$33.99
FREE delivery Thu, Jun 19 on your first order
Loading...
NEEWER CA076 Zfc Handgrip L Shape Grip for Nikon Z fc, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle/Brass Shutter Button, Compatible with Arca Swiss Tripod Fluid Head, Black

NEEWER CA076 Zfc Handgrip L Shape Grip for Nikon Z fc, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle/Brass Shutter Button, Compatible with Arca Swiss Tripod Fluid Head, Black

(175)
$33.99
FREE delivery Thu, Jun 19 on your first order