Forum Replies Created

Viewing 1 replies (of 1 total)
  • WooCommerce (at least in version 2.1.7) has an apply-filters tag in that checked statement now:
    (from default form-billing.php):
    <input class="input-checkbox" id="createaccount" <?php checked( ( true === $checkout->get_value( 'createaccount' ) || ( true === apply_filters( 'woocommerce_create_account_default_checked', false ) ) ), true) ?> type="checkbox" name="createaccount" value="1" /> <label for="createaccount" class="checkbox"><?php _e( 'Create an account?', 'woocommerce' ); ?></label>

    So, simply adding this statement in functions.php should work:
    add_filter( 'woocommerce_create_account_default_checked', function( $isChecked) { return true; } );

Viewing 1 replies (of 1 total)