Note that there are some explanatory texts on larger screens.

plurals
  1. POWooCommerce Queries
    text
    copied!<p>Good Day,</p> <p>I am fairly new to WordPress and WooCommerce. But I am fairly versed in PHP and MySQL. So my question is, how do I go about making a specific query for WooCommerce where I can point it to specific meta. For example, if I wanted to make a query to call all the different categories within WooCommerce> I would normally call it like this;</p> <pre><code>$args = array( 'number' =&gt; 'null', 'orderby' =&gt; 'name', 'order' =&gt; 'ASC', 'columns' =&gt; '4', 'hide_empty' =&gt; '1', 'parent' =&gt; '', 'ids' =&gt; '' ) </code></pre> <p>Ok so that would be my query, now what I am so struggling with is what do I do with it it now? Cause that part there is what everyone shows, no one tells you or shows you how to actually use the query or where to start. I have used the basic WP query function, but then the only categories I receive back come from WP and WC. So how do I point it directly to WC? Furthermore, these hooks annoy me so. So how do I go about doing it the normal way, bypassing WC and WP functions and build my own query;</p> <pre><code> $query = "SELECT * FROM wc_categories"; $result = mysql_query($query); $temp_array = mysqli_fetch_array($result); </code></pre> <p>That is how I would love to do it, cause no one explains hooks and how to use it, or edit it, everyone assumes that you are <strong>pro-leet</strong> when it come to familial of WP workings.</p> <p>So if anyone can point me in the right direction, I would really appreciate it. And I would love you long time if you could explain to me how to go about my 2nd code block cause that is my preferred way.</p> <p>Kind Regards, DK</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload