Much easy:
$xml = simplexml_load_string($response);
wp_send_json_success([ "data" => $xml ]);
Related Posts:
- WordPress ajax-action failing because of newline in response
- Accessing an API with jQuery and AJAX
- calling admin-ajax.php from admin-ajax.php
- Contactform7: display results from CURL
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- WordPress AJAX Pagination with query_posts
- PHP calling AJAX function that relies on passed PHP function values not working
- Looking for a better way to handle an ajax script that pulls in post data on click
- How to add default images into theme customizer image control?
- Can’t use get_results() in ajax query
- How can I export post data in xml format?
- Debugging PHP object during Ajax call in WordPress
- WordPress Ajax Data problem
- Problem with WordPress Ajax form
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Passing jQuery value using Ajax to a page template
- How to set a custom path, for ajax image upload folder in admin?
- ajax_object is not defined when ajax calls the function
- Page Reloads Before AJAX Request Finishes
- Why is this Ajax not working?
- Creating login session via CURL
- Ajax return code 400
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- How to make drop down post title
- Create onClick Event to Re-load a Widget
- ajax, right way to do it and make it works?
- export a csv file from the database with a cronjob
- WordPress ajax doesn’t display object method on jQuery .change() function
- Problem with custom plugin using AJAX to pull info from php file
- Call a PHP Function with Multiple Parameters that is outside the AJAX Handler
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- WordPress, AJAX and pre_get_posts using conditional tags
- How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?
- Refresh table data with Ajax
- Setting value of session with Ajax not working
- get post content of particular post by url
- Ajax contact form return 0
- AJAX – Returning Two JSON Objects with One PHP Function
- unable to use ‘new WP_Query’ in AJAX call
- admin-ajax Firing Error 400 When Logged In
- is_user_logged_in() not working in AJAX validation call
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- Problem with AJAX in wordpress plugin
- How to keep track of when a vote is cast?
- Woocommerce with Lazy Load php and ajax
- AJAX wp_insert_user WORKS but responds with “The site is not enabled”
- Ajax filter button display all posts
- Can I make get_users() query global?
- Compare $_POST returned values with term array
- My jQuery Ajax form submit is still refreshing page?
- Output votes to div dynamically in wordpress
- Incrementing PHP variable onclick to display posts by month
- cURL error 6 on news area, and also won’t auto update
- How to use AJAX in WordPress in MYSQL query?
- Post to WordPress from another Server via PHP
- Live search from database table
- Processing ajax call to php to insert into mysql database
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- Fetching review value using wpdb class
- Display WordPress search results based on the selected Sub-Category
- Deleting records with AJAX, deleting records as I search
- Using some Loop or repeatable fucntion in AJAX and PHP to reduce repeatability
- How do I call a value from the datase using ajax
- Post form – AJAX won’t upload featured image – Plugin development
- Load more posts using AJAX based on posts inside WP_Query
- PHP calling AJAX function that relies on passed PHP function values not working
- Where to add my PHP codes for AJAX Jquery to work?
- Adding ELSE argument to AJAX Live Search for “No results found”
- How can i find wrong word in search box and replace with correct word
- How to use wp_ajax_set_post_thumbnail?
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Can’t make lazy load for my site, help!
- How to reload a php script, using AJAX and jQuery
- Change WooCommerce currency programmatically on AJAX request
- Top Authors list by highest post views with Ajax pagination
- Offset with ajax load more posts duplicates
- number of posts with “Load More”
- How to send Ajax Call from frontend without using wp_localize_script in Theme
- wordpress more than one ajax request at the same time issue
- Ajax not updating to database
- Ajax Load more CPT via shortcode
- MySQL query in WordPress with AJAX
- Registration form not registering First and Last name
- Result from wp_send_json adds line feed
- Is custom behaviour possible when asynchronously uploading?
- AJAX with Selectbox Plugins (Select2, Chosen, Selectize)
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- Data inserted in database, but ajax calls error function
- Load Meta box value into div AJAX [duplicate]
- how to iterate through xml data?
- Detecting IP Address of someone using ‘copy’ function [closed]
- Remove Woocommerce product from cart with ajax/fetch
- WooCommerce Modal Fly cart on add to cart – With AJAX
- Word press – JSPDF – Sending PDF as attachment from wp_mail – Special characters
- Upload multiple files via ajax from an HTML file input
- How to pass javascript var to php var
- Ajax infinite scroll random order shows duplicate posts on custom post type