WordPress Developer Ukraine, Kyiv
WooCommerce Product Recommendations with Custom Scoring Algorithms

WooCommerce Product Recommendations with Custom Scoring Algorithms

WooCommerce product recommendations with your own scoring WooCommerce upsells and cross-sells are curated by hand: the shop owner links related products one by one. On a store with hundreds of products nobody keeps that up to date. A simple algorithm based on what customers actually bought together, weighted by category, gives a relevant “Customers also…
WordPress HTTP API: wp_remote_get and wp_remote_post Best Practices

WordPress HTTP API: wp_remote_get and wp_remote_post Best Practices

WordPress HTTP API: wp_remote_get() and wp_remote_post() best practices The WordPress HTTP API (wp_remote_get(), wp_remote_post(), wp_remote_request()) wraps the transport (cURL or PHP streams) in one interface with the same arguments and the same response format everywhere. Used carelessly it gives silent failures, hung pages and API rate limits; used well it needs four habits: check errors,…
Cache Expensive Operations with the WordPress Transients API

Cache Expensive Operations with the WordPress Transients API

Cache expensive operations with the WordPress Transients API The Transients API stores cached data with an expiration time. The same set_transient() and get_transient() calls use the wp_options table on a default install and memory (Redis, Memcached) when a persistent object cache is active, without any code changes. Good candidates are remote API responses, heavy WP_Query…
Reduce WordPress Time to First Byte with Object Caching and Redis

Reduce WordPress Time to First Byte with Object Caching and Redis

Lower WordPress TTFB with Redis as a persistent object cache WordPress caches options, posts, terms and user data in memory, but only for one request. The next request asks MySQL again. A persistent object cache keeps these values in Redis between requests, so a page that needed 80 queries needs 10. It helps where a…