From 126068de8c836316a031e997638ccf068cef4ed3 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 22 Aug 2013 12:11:19 +0100 Subject: [PATCH] Moved options around for checkout settings. --- .../settings/class-wc-settings-accounts.php | 4 +- .../settings/class-wc-settings-checkout.php | 127 +++++++++--------- 2 files changed, 64 insertions(+), 67 deletions(-) diff --git a/includes/admin/settings/class-wc-settings-accounts.php b/includes/admin/settings/class-wc-settings-accounts.php index 506f43bad5e..de882e608c7 100644 --- a/includes/admin/settings/class-wc-settings-accounts.php +++ b/includes/admin/settings/class-wc-settings-accounts.php @@ -38,7 +38,7 @@ class WC_Settings_Accounts extends WC_Settings_Page { return apply_filters( 'woocommerce_' . $this->id . '_settings', array( - array( 'title' => __( 'Account Pages', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'The following pages need to be selected so that WooCommerce knows where they are located.', 'woocommerce' ), 'id' => 'account_page_options' ), + array( 'title' => __( 'Account Pages', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'These pages need to be set so that WooCommerce knows where to send users to access account related functionality.', 'woocommerce' ), 'id' => 'account_page_options' ), array( 'title' => __( 'My Account Page', 'woocommerce' ), @@ -64,7 +64,7 @@ class WC_Settings_Accounts extends WC_Settings_Page { array( 'type' => 'sectionend', 'id' => 'account_page_options' ), - array( 'title' => __( 'My Account Endpoints', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'The following endpoints are used on the frontend for certain pages.', 'woocommerce' ), 'id' => 'account_endpoint_options' ), + array( 'title' => __( 'My Account Endpoints', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'Endpoints are appended to your page URLs to handle specific actions on the accounts pages. They should be unique.', 'woocommerce' ), 'id' => 'account_endpoint_options' ), array( 'title' => __( 'View Order', 'woocommerce' ), diff --git a/includes/admin/settings/class-wc-settings-checkout.php b/includes/admin/settings/class-wc-settings-checkout.php index cb9c81af01d..4d3876631ea 100644 --- a/includes/admin/settings/class-wc-settings-checkout.php +++ b/includes/admin/settings/class-wc-settings-checkout.php @@ -62,67 +62,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page { public function get_settings() { return apply_filters( 'woocommerce_payment_gateways_settings', array( - array( 'title' => __( 'Checkout Pages', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_page_options' ), - - array( - 'title' => __( 'Cart Page', 'woocommerce' ), - 'desc' => __( 'Page contents: [woocommerce_cart]', 'woocommerce' ), - 'id' => 'woocommerce_cart_page_id', - 'type' => 'single_select_page', - 'default' => '', - 'class' => 'chosen_select_nostd', - 'css' => 'min-width:300px;', - 'desc_tip' => true, - ), - - array( - 'title' => __( 'Checkout Page', 'woocommerce' ), - 'desc' => __( 'Page contents: [woocommerce_checkout]', 'woocommerce' ), - 'id' => 'woocommerce_checkout_page_id', - 'type' => 'single_select_page', - 'default' => '', - 'class' => 'chosen_select_nostd', - 'css' => 'min-width:300px;', - 'desc_tip' => true, - ), - - array( - 'title' => __( 'Terms and Conditions', 'woocommerce' ), - 'desc' => __( 'If you define a "Terms" page the customer will be asked if they accept them when checking out.', 'woocommerce' ), - 'id' => 'woocommerce_terms_page_id', - 'default' => '', - 'class' => 'chosen_select_nostd', - 'css' => 'min-width:300px;', - 'type' => 'single_select_page', - 'desc_tip' => true, - 'autoload' => false - ), - - array( 'type' => 'sectionend', 'id' => 'checkout_page_options' ), - - array( 'title' => __( 'Checkout Endpoints', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'The following endpoints are used on the frontend for certain pages.', 'woocommerce' ), 'id' => 'account_endpoint_options' ), - - array( - 'title' => __( 'Pay', 'woocommerce' ), - 'desc' => __( 'Endpoint for the Checkout → Pay page', 'woocommerce' ), - 'id' => 'woocommerce_checkout_pay_endpoint', - 'type' => 'text', - 'default' => 'order-pay', - 'desc_tip' => true, - ), - - array( - 'title' => __( 'Order Received', 'woocommerce' ), - 'desc' => __( 'Endpoint for the Checkout → Pay page', 'woocommerce' ), - 'id' => 'woocommerce_checkout_order_received_endpoint', - 'type' => 'text', - 'default' => 'order-received', - 'desc_tip' => true, - ), - - array( 'type' => 'sectionend', 'id' => 'checkout_endpoint_options' ), - - array( 'title' => __( 'Checkout Process', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_account_options' ), + array( 'title' => __( 'Checkout Process', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_process_options' ), array( 'title' => __( 'Coupons', 'woocommerce' ), @@ -164,11 +104,69 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page { 'show_if_checked' => 'yes', ), + array( 'type' => 'sectionend', 'id' => 'checkout_process_options'), + array( 'title' => __( 'Checkout Pages', 'woocommerce' ), 'desc' => __( 'These pages need to be set so that WooCommerce knows where to send users to checkout.', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_page_options' ), - array( 'type' => 'sectionend', 'id' => 'checkout_account_options'), + array( + 'title' => __( 'Cart Page', 'woocommerce' ), + 'desc' => __( 'Page contents: [woocommerce_cart]', 'woocommerce' ), + 'id' => 'woocommerce_cart_page_id', + 'type' => 'single_select_page', + 'default' => '', + 'class' => 'chosen_select_nostd', + 'css' => 'min-width:300px;', + 'desc_tip' => true, + ), - array( 'type' => 'title', 'id' => 'payment_gateways_options' ), + array( + 'title' => __( 'Checkout Page', 'woocommerce' ), + 'desc' => __( 'Page contents: [woocommerce_checkout]', 'woocommerce' ), + 'id' => 'woocommerce_checkout_page_id', + 'type' => 'single_select_page', + 'default' => '', + 'class' => 'chosen_select_nostd', + 'css' => 'min-width:300px;', + 'desc_tip' => true, + ), + + array( + 'title' => __( 'Terms and Conditions', 'woocommerce' ), + 'desc' => __( 'If you define a "Terms" page the customer will be asked if they accept them when checking out.', 'woocommerce' ), + 'id' => 'woocommerce_terms_page_id', + 'default' => '', + 'class' => 'chosen_select_nostd', + 'css' => 'min-width:300px;', + 'type' => 'single_select_page', + 'desc_tip' => true, + 'autoload' => false + ), + + array( 'type' => 'sectionend', 'id' => 'checkout_page_options' ), + + array( 'title' => __( 'Checkout Endpoints', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'Endpoints are appended to your page URLs to handle specific actions during the checkout process. They should be unique.', 'woocommerce' ), 'id' => 'account_endpoint_options' ), + + array( + 'title' => __( 'Pay', 'woocommerce' ), + 'desc' => __( 'Endpoint for the Checkout → Pay page', 'woocommerce' ), + 'id' => 'woocommerce_checkout_pay_endpoint', + 'type' => 'text', + 'default' => 'order-pay', + 'desc_tip' => true, + ), + + array( + 'title' => __( 'Order Received', 'woocommerce' ), + 'desc' => __( 'Endpoint for the Checkout → Pay page', 'woocommerce' ), + 'id' => 'woocommerce_checkout_order_received_endpoint', + 'type' => 'text', + 'default' => 'order-received', + 'desc_tip' => true, + ), + + array( 'type' => 'sectionend', 'id' => 'checkout_endpoint_options' ), + + array( 'title' => __( 'Payment Gateways', 'woocommerce' ), 'desc' => __( 'Installed gateways are listed below. Drag and drop gateways to control their display order on the frontend.', 'woocommerce' ), 'type' => 'title', 'id' => 'payment_gateways_options' ), array( 'type' => 'payment_gateways' ), @@ -209,9 +207,8 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page { public function payment_gateways_setting() { ?> - + -