<?php

defined('ABSPATH') || exit;

if (class_exists('WC_Product')) {
    class WC_Product_BundlePress_Product extends WC_Product
    {
        public function get_type()
        {
            return 'bundlepress';
        }

        public function is_purchasable()
        {
            return true;
        }

        public function get_price_html($price = '')
        {
            return parent::get_price_html($price);
        }

        public function add_to_cart_url()
        {
            return add_query_arg('add-to-cart', $this->get_id(), wc_get_checkout_url());
        }

        public function add_to_cart_text()
        {
            return 'Add Bundle to Cart';
        }
    }
}
