Is there a way to get 3+ dimensional array from a single MySql command

The direct answer to the question “Is there a way to get 3+ dimensional array from a single MySql command” would be yes, sort of – WordPress routinely stores and retrieves multidimensional data from MySQL rows by serialize()ing and unserialize()ing structured data to/from a string format, so it’s certainly possible using WordPress’s database interaction mechanisms. … Read more

Stumped on migration

You need to turn WP_DEBUG on in your wp-config.php: define( ‘WP_DEBUG’, true ); That’ll help a lot with working out where that 500 error is coming from. Based on the PHP versions you’ve mentioned, I’m 99.999% sure that the error is due to a feature that isn’t available in PHP 5.2.17. You’re probably looking at … Read more

Add user data to table when user is created?

Looks to me you should be seeking a woocommerce purchase completion hook. This would be when you could add that a donation has been made and at what amount, then you could grab any user information, amounted donated and other info you need and save it to your donor table. use this: add_action(‘woocommerce_order_status_completed’, ‘save_to_donors’,10,1); instead … Read more

WordPress Install and Database on separate hosting?

Yes – absolutely. Simply enter the appropriate hostname and credentials in wp-config.php. Instead of the default localhost use the hostname provided by your database provider. Example: define( ‘DB_HOST’, ‘mysql.example.com:3307’ ); https://codex.wordpress.org/Editing_wp-config.php#Set_Database_Host

Setting All Drafts to ‘exclude-from-catalog’ in WooCommerce

Look into wp_set_object_terms() You could do something along the lines of: wp_set_object_terms( $post_id, ‘exclude-from-catalog’, ‘product_visibility’ ); Getting all posts by status, use Wp_Query. I added the ‘fields’ => ‘ids’ param to limit the query to only ids, rather than gathering whole post objects. On an array of posts that have Draft or Pending as a … Read more