I Want a More Concice Form of Data than an Array

Instead of going for a complex nested array, I decided that it might be best to keep it to simple two level set of arrays. $x = array( 101 => [ (int $parent_id), (bool $completed) ], 102 => [ (int $parent_id), (bool $completed) ], 103 => [ (int $parent_id), (bool $completed) ], 104 => [ … Read more

How does one make a URL return dynamic JSON with custom Content Type?

I asked this on stack overflow as well. You can find that answer here: https://stackoverflow.com/a/56801044/343292 I’ll copy and paste the answer below incase the link ever breaks. It worked for me. I used the dynamic way. ANSWER FROM @Sally CJ Note: I’m assuming WordPress is installed in the root folder. So if you want http://example.com/apple-app-site-association … Read more

Working with a json feed & trying to figure out how best to import

You could use a combination of update_post_meta(), set_objetc_terms(), and wp_update_post() to update your products. It is a good idea to use taxonomies (product categories and product attributes in WooC) as extensively as possible to store common product data as it makes searching for products faster compared to storing the data in post_meta. Here’s a concept … Read more