This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Example custom variation meta for WooCommerce | |
* Plugin URI: hhttps://www.kathyisawesome.com/add-custom-meta-fields-to-woocommerce-variations/ | |
* Description: Add thickness and diameter fields to variations. | |
* Version: 6.22.5 | |
* Author: Kathy Darling | |
* Author URI: https://kathyisawesome.com/ | |
* | |
* Text Domain: extra-product-data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get all users | |
var url = "http://localhost:8080/api/v1/users"; | |
var xhr = new XMLHttpRequest() | |
xhr.open('GET', url, true) | |
xhr.onload = function () { | |
var users = JSON.parse(xhr.responseText); | |
if (xhr.readyState == 4 && xhr.status == "200") { | |
console.table(users); | |
} else { | |
console.error(users); |