public function parent(\WC_Product $WC_Product)
    {
        if (!$WC_Product->exists()) {
            return null; // Not possible.
        }
        if ($WC_Product->is_type('variation')) {
            $WC_Parent_Product = wc_get_product($WC_Product->get_parent_id());
        } else {
            $WC_Parent_Product = null; // Not applicable.
        }
        return $WC_Parent_Product instanceof \WC_Product && $WC_Parent_Product->exists() ? $WC_Parent_Product : null;
    }