Fixing plugin conflicts with the WordPress decorator pattern
A real WooCommerce case where two plugins both tried to extend wpdb and only one could win. Here is how the decorator pattern wraps the object instead, so they can stack without breaking each other.