I think I have successfully modified the plugin to accomplish this. Is there anything I am missing? Any red flags?
1. Comment out the qwc_cart_validations method, replace with
$product_quotable = product_quote_enabled( $product_id );
if($product_quotable){
$message = 'This product requires special shipping. Continue to add products to your cart and when you checkout, we will review your order and send you an email with a shipping quote for you to pay and complete your order.';
wc_add_notice( __( $message, 'quote-wc' ), $notice_type = 'notice' );
}
2. Add the following in the __construct method
// modify the proceed to checkout button text. Requires modified child template at woo.../cart/proceed-to-checkout-button
add_action('woocommerce_cart_proceed_text', array( &$this, 'j5_qwc_change_checkout_button_text'),20);
// disable shipping
add_filter( 'woocommerce_cart_ready_to_calc_shipping', [&$this, 'j5_qwc_disable_shipping_calc_on_cart'], 99 );
3. Add the following methods
/**
* Modify the Proceed to checkout button on the cart page
* @mod
*/
function j5_qwc_change_checkout_button_text() {
if (cart_contains_quotable()){
esc_html_e( 'Proceed to quote', 'woocommerce' );
}else{
esc_html_e( 'Proceed to checkout', 'woocommerce' );
}
}
function j5_qwc_disable_shipping_calc_on_cart( $show_shipping ) {
if(cart_contains_quotable() ) {
return false;
}
return $show_shipping;
}
4. Modify the qwc_css method by adding
if ( cart_contains_quotable()) {
wp_enqueue_style( 'qwc-frontend', plugins_url( '/assets/css/qwc-disable-shipping.css', __FILE__ ), '', $plugin_version, false );}
5. Create the relevant stylesheet hiding the shipping row