• Resolved jandrix

    (@jandrix)


    Hi, we add code to set a minimum quantity to proceed to checkout, this:

    remove_action( ‘woocommerce_proceed_to_checkout’, ‘woocommerce_button_proceed_to_checkout’, 20 );

    Seems that your plugin doesn’t use native WooCommerce checkout buttons so with this code we can’t disable it. Is there a way to do it?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xootix

    (@xootix)

    Hello,

    Please try adding this snippet to your functions.php

    add_action( 'xoo_wsc_footer_start', function(){
    
    	if( !has_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout' ) ){
    		add_filter( 'xoo_wsc_footer_buttons_args', function( $args ){
    			if( 1 === 1 ){
    				unset( $args['buttons']['checkout'] );
    			}
    			return $args;
    		} );
    	}
    
    }, PHP_INT_MAX );
    Thread Starter jandrix

    (@jandrix)

    It works!

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable checkout button with minimum quantity to buy’ is closed to new replies.