@@ -83,6 +83,13 @@ class WooTab extends WC_Settings_Page implements Hookable {
8383 */
8484 const ALT_LOGIN_URL = 'cc_woo_store_information_alt_login_url ' ;
8585
86+ /**
87+ * Store checkbox location.
88+ *
89+ * @since 2021-07-26
90+ */
91+ const CHECKBOX_LOCATION = 'cc_woo_store_information_checkbox_location ' ;
92+
8693 /**
8794 * Settings section ID.
8895 *
@@ -493,6 +500,17 @@ private function get_store_information_settings() {
493500 'id ' => self ::ALT_LOGIN_URL ,
494501 'type ' => 'text ' ,
495502 ],
503+ [
504+ 'title ' => esc_html__ ( 'Checkbox Filter Location ' , 'cc-woo ' ),
505+ 'desc ' => esc_html__ ( 'Change filter location where checkbox is rendered. ' , 'cc-woo ' ),
506+ 'type ' => 'select ' ,
507+ 'id ' => self ::CHECKBOX_LOCATION ,
508+ 'default ' => 'false ' ,
509+ 'options ' => [
510+ 'woocommerce_after_checkout_billing_form ' => esc_html__ ( 'After checkout billing form ' , 'cc-woo ' ),
511+ 'woocommerce_review_order_before_submit ' => esc_html__ ( 'Before order submit button ' , 'cc-woo ' ),
512+ ],
513+ ],
496514 [
497515 'type ' => 'sectionend ' ,
498516 'id ' => 'cc_woo_store_information_settings ' ,
@@ -662,7 +680,8 @@ private function meets_connect_requirements() {
662680 get_option ( self ::STORE_NAME_FIELD , '' ),
663681 get_option ( self ::CURRENCY_FIELD , '' ),
664682 get_option ( self ::COUNTRY_CODE_FIELD ),
665- get_option ( self ::EMAIL_FIELD )
683+ get_option ( self ::EMAIL_FIELD ),
684+ get_option ( self ::CHECKBOX_LOCATION , 'woocommerce_after_checkout_billing_form ' )
666685 );
667686
668687 $ validator = new SettingsValidator ( $ model );
0 commit comments