From f03735d8f65357f9c17479adfe24071cf4c9921a Mon Sep 17 00:00:00 2001 From: Coen Jacobs Date: Mon, 6 May 2013 12:03:31 +0200 Subject: [PATCH] Add 'woocommerce_create_account_default_checked' for #3098 --- readme.txt | 1 + templates/checkout/form-billing.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index b3ae4fca35d..314615a9a01 100644 --- a/readme.txt +++ b/readme.txt @@ -167,6 +167,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc = 2.1 - x = * Tweak - Searching for SKU in admin panel can also be done via lowercase 'sku:' instead of just 'SKU:' +* Tweak - Added filter to check the 'Create account' checkbox on checkout by default * Fix - Cast term_id as int in product data write panel that will resolve issues with numerical attributes * Refactor - Taken out Piwik integration, use http://wordpress.org/extend/plugins/woocommerce-piwik-integration/ from now on * Refactor - Taken out ShareYourCart integration, use http://wordpress.org/extend/plugins/shareyourcart/ from now on diff --git a/templates/checkout/form-billing.php b/templates/checkout/form-billing.php index 01e265ca802..f824ea526aa 100644 --- a/templates/checkout/form-billing.php +++ b/templates/checkout/form-billing.php @@ -36,13 +36,15 @@ global $woocommerce; enable_signup ) : ?> - enable_guest_checkout ) : ?> + enable_guest_checkout ) { + $checked_value = ( true === $checkout->get_value('createaccount') || ( true === apply_filters( 'woocommerce_create_account_default_checked', false ) ) ); + ?>

- get_value('createaccount'), true) ?> type="checkbox" name="createaccount" value="1" /> + type="checkbox" name="createaccount" value="1" />

- +