move max_purchase_id() and invalidate_max_purchase_id_transient() from purchase-log.class.php into misc.functions.php