Category Archives: Uncategorized

Three practically painless ways to expand your network — ideas.ted.com

You’ve worked out an efficient way of living your life, but you end up seeing the same people because they’re also following their own routines. Why not make your network slightly more inefficient? Go to a bathroom on a different … Continue reading

Posted in productivity, Uncategorized | Tagged , | Leave a comment

23andme kit only for $49

Great deal https://www.amazon.com/23andMe-Ancestry-Personal-Genetic-Service/dp/B01LZ5K87Z/ I bought it for €169 several months ago

Posted in Uncategorized | Leave a comment

SQL to get WooCommerce product categories (terms)

For an import script I needed to get WooCommerce product categories so I ended up looking the generated query in /var/log/mysql/query.log for get_the_terms($postID, ‘taxonomy_name’) I ended up using the following SQL query to get product categories: SELECT t.*, tt.* FROM … Continue reading

Posted in mysql, sql, Uncategorized, woocommerce, wordpress | Tagged , , , , | Leave a comment

Change locale for WooCommerce email

To change WooCommerce email language you need to change the locale after order submit. Using $_GET might be dirty, but works 🙂

Posted in Uncategorized, woocommerce, wordpress | Tagged , , , , | Leave a comment

Debugging duplicate query exec in WordPress

During debugging a plugin malfunction I had duplicate option update SQL queries and after som thinking I came up with the following debug line to catch the trace of duplicate function call: error_log(var_export(debug_backtrace(), true)); I placed it above the return … Continue reading

Posted in Uncategorized, wordpress | Tagged | Leave a comment

Mail sending via SMTP for WordPress

I was looking for some really simple SMTP solution for WordPress, only some code to send emails via SMTP. Without a plugin for localhost usage. Came up with the following script in wp-content/mu-plugins/smtp.php <?php add_action(‘phpmailer_init’, ‘custom_phpmailer_init’); function custom_phpmailer_init($phpmailer) { $phpmailer->IsSMTP(); … Continue reading

Posted in Uncategorized, wordpress | Tagged , | Leave a comment

Useful Postfix CLI commands to manage email queue

During dev I sometimes need to check what emails are scheduled to be sent. Display a list of queued mails sudo mailq View message in queue sudo postcat -vq QUEUE_ID Delete queued mail after debugging sudo postsuper -d ALL

Posted in postfix, Uncategorized | Tagged , , | Leave a comment