• Resolved petschko

    (@petschko)


    Hey,

    I want to add a Checkbox to my Checkout-Form, which gives the Option to get a small discount but the User can only check the box, when the User is logged in else I want to show the Checkbox but only in a disabled state. Is there any way to add a Custom Checkout-Box

    I had something like this in my mind:

    
    		$fields['billing']['billing_want_rabat'] = array(
    			'type' => 'checkbox',
    			'label' => __('Rabatt-Action only with Account', 'woocommerce'),
    			'class' => array('form-row-wide'),
    			'clear' => true,
    			'disabled' => ((get_current_user_id()) ? false : true) // This don't work is there any other way
    		);
    

    But I could not find anything like that, it seems that WooCommerce don’t ofer this option.

    I would love to know if there is such a function or any way to setup a disabled checkbox in the Checkout form

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disabled Custom-Checkout Box how?’ is closed to new replies.