Changeset 3491055
- Timestamp:
- 03/25/2026 03:43:13 PM (3 days ago)
- Location:
- shop-as-client
- Files:
-
- 4 edited
- 1 copied
-
tags/7.4 (copied) (copied from shop-as-client/trunk)
-
tags/7.4/readme.txt (modified) (2 diffs)
-
tags/7.4/shop-as-client.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/shop-as-client.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shop-as-client/tags/7.4/readme.txt
r3460967 r3491055 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 7. 37 Stable tag: 7.4 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 120 120 == Changelog == 121 121 122 = 7.4 - 2025-03-25 = 123 * [NEW] Free plugin ownership transferred from [Marco Almeida | Webdados](https://profiles.wordpress.org/webdados/) to [Naked Cat Plugins](https://profiles.wordpress.org/nakedcatplugins/) on WordPress.org - No worries, we’re the same people :-) 124 * [TWEAK] Settings moved to a new section called “Shop as client” under “Accounts & Privacy” 125 * [DEV] Tested with 7.0-RC1-62112 and WooCommerce 10.6.1 126 122 127 = 7.3 - 2025-02-13 = 123 -[FIX] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Build release ZIP GitHub action to make sure WordPress detects a direct upload as the same plugin instead of creating a new folder124 -[DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Updater v13.1125 -[DEV] Tested with WordPress 7.0-alpha-61630 and WooCommerce 10.5.1128 * [FIX] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Build release ZIP GitHub action to make sure WordPress detects a direct upload as the same plugin instead of creating a new folder 129 * [DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Updater v13.1 130 * [DEV] Tested with WordPress 7.0-alpha-61630 and WooCommerce 10.5.1 126 131 127 132 = 7.2 - 2026-01-23 = 128 -[NEW] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Improve compatibility with [Taxonomy Discounts for WooCommerce](https://nakedcatplugins.com/product/taxonomy-term-and-role-based-discounts-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): allow changing the cart item price even if a taxonomy discount is applied to it129 -[DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): New updater v13 with better license status information on the plugin settings screen and plugins list130 -[DEV] Implement release automations via GitHub Actions131 -[DEV] Tested with WordPress 7.0-alpha-61496 and WooCommerce 10.5.0-beta.1133 * [NEW] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Improve compatibility with [Taxonomy Discounts for WooCommerce](https://nakedcatplugins.com/product/taxonomy-term-and-role-based-discounts-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): allow changing the cart item price even if a taxonomy discount is applied to it 134 * [DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): New updater v13 with better license status information on the plugin settings screen and plugins list 135 * [DEV] Implement release automations via GitHub Actions 136 * [DEV] Tested with WordPress 7.0-alpha-61496 and WooCommerce 10.5.0-beta.1 132 137 133 138 = 7.1 - 2026-01-01 = 134 -Free version not released139 * Free version not released 135 140 136 141 = 7.0 - 2025-12-30 = -
shop-as-client/tags/7.4/shop-as-client.php
r3460967 r3491055 4 4 * Plugin URI: https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/ 5 5 * Description: Allows a WooCommerce Store Administrator or Shop Manager to use the frontend and assign a new order to a registered or new customer. Useful for phone or email orders. 6 * Version: 7. 36 * Version: 7.4 7 7 * Author: Naked Cat Plugins (by Webdados) 8 8 * Author URI: https://nakedcatplugins.com/ … … 13 13 * Requires PHP: 7.4 14 14 * WC requires at least: 7.1 15 * WC tested up to: 10. 515 * WC tested up to: 10.6 16 16 * Requires Plugins: woocommerce 17 17 * License: GPLv3 … … 66 66 $action_links = array( 67 67 sprintf( 68 '<a href="admin.php?page=wc-settings&tab=account #shop_as_client_pro_license_key">%s</a>',68 '<a href="admin.php?page=wc-settings&tab=account&section=shop_as_client">%s</a>', 69 69 __( 'Settings', 'shop-as-client' ) 70 70 ), … … 75 75 76 76 /** 77 * Fake settings 78 * 79 * @param array $settings The current settings. 80 */ 81 function shop_as_client_woocommerce_account_settings( $settings ) { 82 $our_settings = array(); 83 if ( ! defined( 'SHOPASCLIENT_PRO_PLUGIN_FILE' ) ) { 84 $description = sprintf( 85 /* translators: %1$s: link open, %2$s: link close */ 86 __( 'Available on the %1$sPRO Add-on%2$s', 'shop-as-client' ), 87 '<a href="' . esc_url( SHOPASCLIENT_PRO_OUT_LINK ) . '">', 88 '</a>' 89 ); 90 $our_settings = array( 91 array( 92 'title' => __( 'Shop as Client', 'shop-as-client' ) . sprintf( 93 ' (Free %s)', 94 SHOPASCLIENT_VERSION 95 ), 96 'type' => 'title', 97 'id' => 'shop_as_client_options', 98 ), 99 // Disabled fields here (shop as client default, create user field default, search on orders, update customer, clear checkout fields, Handler) 100 array( 101 'title' => __( 'Shop as client field default', 'shop-as-client' ), 102 'id' => 'shop_as_client_pro_shop_as_client_default', 103 'type' => 'select', 104 'options' => array( 105 'yes' => __( 'Yes', 'shop-as-client' ), 106 'no' => __( 'No', 'shop-as-client' ), 107 ), 108 'default' => 'yes', 109 'desc' => $description, 110 'custom_attributes' => array( 111 'disabled' => 'disabled', 112 ), 113 ), 114 array( 115 'title' => __( 'Create user field default', 'shop-as-client' ), 116 'id' => 'shop_as_client_pro_create_user_default', 117 'type' => 'select', 118 'options' => array( 119 'yes' => __( 'Yes', 'shop-as-client' ), 120 'no' => __( 'No', 'shop-as-client' ), 121 ), 122 'default' => 'yes', 123 'desc' => $description, 124 'custom_attributes' => array( 125 'disabled' => 'disabled', 126 ), 127 ), 128 array( 129 'title' => __( 'Search on orders', 'shop-as-client' ), 130 'desc' => __( 'By default, the search is only performed on registered users by their registration and billing email, but if you enable this option it will also be done on orders (if not found as user), so you can get data from guest customers.', 'shop-as-client' ) . '<br/>' . $description, 131 'id' => 'shop_as_client_pro_search_orders', 132 'type' => 'select', 133 'options' => array( 134 'yes' => __( 'Yes', 'shop-as-client' ), 135 'no' => __( 'No', 'shop-as-client' ), 136 ), 137 'default' => 'yes', 138 'custom_attributes' => array( 139 'disabled' => 'disabled', 140 ), 141 ), 142 array( 143 'title' => __( 'Update customer', 'shop-as-client' ), 144 'desc' => __( 'Update the customer details on his profile', 'shop-as-client' ) . '<br/>' . $description, 145 'id' => 'shop_as_client_pro_update_customer', 146 'type' => 'select', 147 'options' => array( 148 'yes' => __( 'Yes', 'shop-as-client' ), 149 'no' => __( 'No', 'shop-as-client' ), 150 ), 151 'default' => 'yes', 152 'custom_attributes' => array( 153 'disabled' => 'disabled', 154 ), 155 ), 156 array( 157 'title' => __( 'Clear checkout fields', 'shop-as-client' ), 158 'desc' => ( 159 __( 'Default all checkout fields to blank for Administrators and Shop Managers', 'shop-as-client' ) 160 . 161 '<br/>' 162 . 163 __( 'Only on the classic checkout', 'shop-as-client' ) . '<br/>' . $description 164 ), 165 'id' => 'shop_as_client_pro_empty_checkout', 166 'type' => 'select', 167 'options' => array( 168 'yes' => __( 'Yes', 'shop-as-client' ), 169 'no' => __( 'No', 'shop-as-client' ), 170 ), 171 'default' => 'yes', 172 'custom_attributes' => array( 173 'disabled' => 'disabled', 174 ), 175 ), 176 array( 177 'title' => __( 'Handler on orders list', 'shop-as-client' ), 178 'desc' => __( 'Add a column with the order handler and allow filtering by handler on the admin orders list', 'shop-as-client' ) . '<br/>' . $description, 179 'id' => 'shop_as_client_pro_handler_order_list', 180 'type' => 'select', 181 'options' => array( 182 'yes' => __( 'Yes', 'shop-as-client' ), 183 'no' => __( 'No', 'shop-as-client' ), 184 ), 185 'default' => 'yes', 186 'custom_attributes' => array( 187 'disabled' => 'disabled', 188 ), 189 ), 190 array( 191 'type' => 'sectionend', 192 'id' => 'shop_as_client_options', 193 ), 194 ); 195 } 196 return array_merge( $settings, $our_settings ); 197 } 198 add_filter( 'woocommerce_account_settings', 'shop_as_client_woocommerce_account_settings' ); 77 * Register the section under Accounts & Privacy 78 */ 79 add_filter( 80 'woocommerce_get_sections_account', 81 function ( $sections ) { 82 $sections['shop_as_client'] = __( 'Shop as Client', 'shop-as-client' ); 83 return $sections; 84 } 85 ); 86 87 /** 88 * Settings - Free plugin only (hidden when PRO is active) 89 */ 90 function shop_as_client_get_settings() { 91 $description = sprintf( 92 /* translators: %1$s: link open, %2$s: link close */ 93 __( 'Available on the %1$sPRO Add-on%2$s', 'shop-as-client' ), 94 '<a href="' . esc_url( SHOPASCLIENT_PRO_OUT_LINK ) . '">', 95 '</a>' 96 ); 97 return array( 98 array( 99 'title' => __( 'Shop as Client', 'shop-as-client' ) . sprintf( 100 ' (Free %s)', 101 SHOPASCLIENT_VERSION 102 ), 103 'type' => 'title', 104 'id' => 'shop_as_client_options', 105 ), 106 // Disabled fields here (shop as client default, create user field default, search on orders, update customer, clear checkout fields, Handler) 107 array( 108 'title' => __( 'Shop as client field default', 'shop-as-client' ), 109 'id' => 'shop_as_client_pro_shop_as_client_default', 110 'type' => 'select', 111 'options' => array( 112 'yes' => __( 'Yes', 'shop-as-client' ), 113 'no' => __( 'No', 'shop-as-client' ), 114 ), 115 'default' => 'yes', 116 'desc' => $description, 117 'custom_attributes' => array( 118 'disabled' => 'disabled', 119 ), 120 ), 121 array( 122 'title' => __( 'Create user field default', 'shop-as-client' ), 123 'id' => 'shop_as_client_pro_create_user_default', 124 'type' => 'select', 125 'options' => array( 126 'yes' => __( 'Yes', 'shop-as-client' ), 127 'no' => __( 'No', 'shop-as-client' ), 128 ), 129 'default' => 'yes', 130 'desc' => $description, 131 'custom_attributes' => array( 132 'disabled' => 'disabled', 133 ), 134 ), 135 array( 136 'title' => __( 'Search on orders', 'shop-as-client' ), 137 'desc' => __( 'By default, the search is only performed on registered users by their registration and billing email, but if you enable this option it will also be done on orders (if not found as user), so you can get data from guest customers.', 'shop-as-client' ) . '<br/>' . $description, 138 'id' => 'shop_as_client_pro_search_orders', 139 'type' => 'select', 140 'options' => array( 141 'yes' => __( 'Yes', 'shop-as-client' ), 142 'no' => __( 'No', 'shop-as-client' ), 143 ), 144 'default' => 'yes', 145 'custom_attributes' => array( 146 'disabled' => 'disabled', 147 ), 148 ), 149 array( 150 'title' => __( 'Update customer', 'shop-as-client' ), 151 'desc' => __( 'Update the customer details on his profile', 'shop-as-client' ) . '<br/>' . $description, 152 'id' => 'shop_as_client_pro_update_customer', 153 'type' => 'select', 154 'options' => array( 155 'yes' => __( 'Yes', 'shop-as-client' ), 156 'no' => __( 'No', 'shop-as-client' ), 157 ), 158 'default' => 'yes', 159 'custom_attributes' => array( 160 'disabled' => 'disabled', 161 ), 162 ), 163 array( 164 'title' => __( 'Clear checkout fields', 'shop-as-client' ), 165 'desc' => ( 166 __( 'Default all checkout fields to blank for Administrators and Shop Managers', 'shop-as-client' ) 167 . 168 '<br/>' 169 . 170 __( 'Only on the classic checkout', 'shop-as-client' ) . '<br/>' . $description 171 ), 172 'id' => 'shop_as_client_pro_empty_checkout', 173 'type' => 'select', 174 'options' => array( 175 'yes' => __( 'Yes', 'shop-as-client' ), 176 'no' => __( 'No', 'shop-as-client' ), 177 ), 178 'default' => 'yes', 179 'custom_attributes' => array( 180 'disabled' => 'disabled', 181 ), 182 ), 183 array( 184 'title' => __( 'Handler on orders list', 'shop-as-client' ), 185 'desc' => __( 'Add a column with the order handler and allow filtering by handler on the admin orders list', 'shop-as-client' ) . '<br/>' . $description, 186 'id' => 'shop_as_client_pro_handler_order_list', 187 'type' => 'select', 188 'options' => array( 189 'yes' => __( 'Yes', 'shop-as-client' ), 190 'no' => __( 'No', 'shop-as-client' ), 191 ), 192 'default' => 'yes', 193 'custom_attributes' => array( 194 'disabled' => 'disabled', 195 ), 196 ), 197 array( 198 'type' => 'sectionend', 199 'id' => 'shop_as_client_options', 200 ), 201 ); 202 } 203 add_filter( 204 'woocommerce_get_settings_account', 205 function ( $settings, $current_section ) { 206 if ( 'shop_as_client' === $current_section && ! defined( 'SHOPASCLIENT_PRO_PLUGIN_FILE' ) ) { 207 return shop_as_client_get_settings(); 208 } 209 return $settings; 210 }, 211 10, 212 2 213 ); 199 214 200 215 /** -
shop-as-client/trunk/readme.txt
r3460967 r3491055 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 7. 37 Stable tag: 7.4 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 120 120 == Changelog == 121 121 122 = 7.4 - 2025-03-25 = 123 * [NEW] Free plugin ownership transferred from [Marco Almeida | Webdados](https://profiles.wordpress.org/webdados/) to [Naked Cat Plugins](https://profiles.wordpress.org/nakedcatplugins/) on WordPress.org - No worries, we’re the same people :-) 124 * [TWEAK] Settings moved to a new section called “Shop as client” under “Accounts & Privacy” 125 * [DEV] Tested with 7.0-RC1-62112 and WooCommerce 10.6.1 126 122 127 = 7.3 - 2025-02-13 = 123 -[FIX] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Build release ZIP GitHub action to make sure WordPress detects a direct upload as the same plugin instead of creating a new folder124 -[DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Updater v13.1125 -[DEV] Tested with WordPress 7.0-alpha-61630 and WooCommerce 10.5.1128 * [FIX] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Build release ZIP GitHub action to make sure WordPress detects a direct upload as the same plugin instead of creating a new folder 129 * [DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Updater v13.1 130 * [DEV] Tested with WordPress 7.0-alpha-61630 and WooCommerce 10.5.1 126 131 127 132 = 7.2 - 2026-01-23 = 128 -[NEW] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Improve compatibility with [Taxonomy Discounts for WooCommerce](https://nakedcatplugins.com/product/taxonomy-term-and-role-based-discounts-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): allow changing the cart item price even if a taxonomy discount is applied to it129 -[DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): New updater v13 with better license status information on the plugin settings screen and plugins list130 -[DEV] Implement release automations via GitHub Actions131 -[DEV] Tested with WordPress 7.0-alpha-61496 and WooCommerce 10.5.0-beta.1133 * [NEW] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): Improve compatibility with [Taxonomy Discounts for WooCommerce](https://nakedcatplugins.com/product/taxonomy-term-and-role-based-discounts-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): allow changing the cart item price even if a taxonomy discount is applied to it 134 * [DEV] [PRO add-on](https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/?utm_source=wordpress.org&utm_medium=link&utm_campaign=shopasclient_woocommerce_plugin): New updater v13 with better license status information on the plugin settings screen and plugins list 135 * [DEV] Implement release automations via GitHub Actions 136 * [DEV] Tested with WordPress 7.0-alpha-61496 and WooCommerce 10.5.0-beta.1 132 137 133 138 = 7.1 - 2026-01-01 = 134 -Free version not released139 * Free version not released 135 140 136 141 = 7.0 - 2025-12-30 = -
shop-as-client/trunk/shop-as-client.php
r3460967 r3491055 4 4 * Plugin URI: https://nakedcatplugins.com/product/shop-as-client-for-woocommerce-pro-add-on/ 5 5 * Description: Allows a WooCommerce Store Administrator or Shop Manager to use the frontend and assign a new order to a registered or new customer. Useful for phone or email orders. 6 * Version: 7. 36 * Version: 7.4 7 7 * Author: Naked Cat Plugins (by Webdados) 8 8 * Author URI: https://nakedcatplugins.com/ … … 13 13 * Requires PHP: 7.4 14 14 * WC requires at least: 7.1 15 * WC tested up to: 10. 515 * WC tested up to: 10.6 16 16 * Requires Plugins: woocommerce 17 17 * License: GPLv3 … … 66 66 $action_links = array( 67 67 sprintf( 68 '<a href="admin.php?page=wc-settings&tab=account #shop_as_client_pro_license_key">%s</a>',68 '<a href="admin.php?page=wc-settings&tab=account&section=shop_as_client">%s</a>', 69 69 __( 'Settings', 'shop-as-client' ) 70 70 ), … … 75 75 76 76 /** 77 * Fake settings 78 * 79 * @param array $settings The current settings. 80 */ 81 function shop_as_client_woocommerce_account_settings( $settings ) { 82 $our_settings = array(); 83 if ( ! defined( 'SHOPASCLIENT_PRO_PLUGIN_FILE' ) ) { 84 $description = sprintf( 85 /* translators: %1$s: link open, %2$s: link close */ 86 __( 'Available on the %1$sPRO Add-on%2$s', 'shop-as-client' ), 87 '<a href="' . esc_url( SHOPASCLIENT_PRO_OUT_LINK ) . '">', 88 '</a>' 89 ); 90 $our_settings = array( 91 array( 92 'title' => __( 'Shop as Client', 'shop-as-client' ) . sprintf( 93 ' (Free %s)', 94 SHOPASCLIENT_VERSION 95 ), 96 'type' => 'title', 97 'id' => 'shop_as_client_options', 98 ), 99 // Disabled fields here (shop as client default, create user field default, search on orders, update customer, clear checkout fields, Handler) 100 array( 101 'title' => __( 'Shop as client field default', 'shop-as-client' ), 102 'id' => 'shop_as_client_pro_shop_as_client_default', 103 'type' => 'select', 104 'options' => array( 105 'yes' => __( 'Yes', 'shop-as-client' ), 106 'no' => __( 'No', 'shop-as-client' ), 107 ), 108 'default' => 'yes', 109 'desc' => $description, 110 'custom_attributes' => array( 111 'disabled' => 'disabled', 112 ), 113 ), 114 array( 115 'title' => __( 'Create user field default', 'shop-as-client' ), 116 'id' => 'shop_as_client_pro_create_user_default', 117 'type' => 'select', 118 'options' => array( 119 'yes' => __( 'Yes', 'shop-as-client' ), 120 'no' => __( 'No', 'shop-as-client' ), 121 ), 122 'default' => 'yes', 123 'desc' => $description, 124 'custom_attributes' => array( 125 'disabled' => 'disabled', 126 ), 127 ), 128 array( 129 'title' => __( 'Search on orders', 'shop-as-client' ), 130 'desc' => __( 'By default, the search is only performed on registered users by their registration and billing email, but if you enable this option it will also be done on orders (if not found as user), so you can get data from guest customers.', 'shop-as-client' ) . '<br/>' . $description, 131 'id' => 'shop_as_client_pro_search_orders', 132 'type' => 'select', 133 'options' => array( 134 'yes' => __( 'Yes', 'shop-as-client' ), 135 'no' => __( 'No', 'shop-as-client' ), 136 ), 137 'default' => 'yes', 138 'custom_attributes' => array( 139 'disabled' => 'disabled', 140 ), 141 ), 142 array( 143 'title' => __( 'Update customer', 'shop-as-client' ), 144 'desc' => __( 'Update the customer details on his profile', 'shop-as-client' ) . '<br/>' . $description, 145 'id' => 'shop_as_client_pro_update_customer', 146 'type' => 'select', 147 'options' => array( 148 'yes' => __( 'Yes', 'shop-as-client' ), 149 'no' => __( 'No', 'shop-as-client' ), 150 ), 151 'default' => 'yes', 152 'custom_attributes' => array( 153 'disabled' => 'disabled', 154 ), 155 ), 156 array( 157 'title' => __( 'Clear checkout fields', 'shop-as-client' ), 158 'desc' => ( 159 __( 'Default all checkout fields to blank for Administrators and Shop Managers', 'shop-as-client' ) 160 . 161 '<br/>' 162 . 163 __( 'Only on the classic checkout', 'shop-as-client' ) . '<br/>' . $description 164 ), 165 'id' => 'shop_as_client_pro_empty_checkout', 166 'type' => 'select', 167 'options' => array( 168 'yes' => __( 'Yes', 'shop-as-client' ), 169 'no' => __( 'No', 'shop-as-client' ), 170 ), 171 'default' => 'yes', 172 'custom_attributes' => array( 173 'disabled' => 'disabled', 174 ), 175 ), 176 array( 177 'title' => __( 'Handler on orders list', 'shop-as-client' ), 178 'desc' => __( 'Add a column with the order handler and allow filtering by handler on the admin orders list', 'shop-as-client' ) . '<br/>' . $description, 179 'id' => 'shop_as_client_pro_handler_order_list', 180 'type' => 'select', 181 'options' => array( 182 'yes' => __( 'Yes', 'shop-as-client' ), 183 'no' => __( 'No', 'shop-as-client' ), 184 ), 185 'default' => 'yes', 186 'custom_attributes' => array( 187 'disabled' => 'disabled', 188 ), 189 ), 190 array( 191 'type' => 'sectionend', 192 'id' => 'shop_as_client_options', 193 ), 194 ); 195 } 196 return array_merge( $settings, $our_settings ); 197 } 198 add_filter( 'woocommerce_account_settings', 'shop_as_client_woocommerce_account_settings' ); 77 * Register the section under Accounts & Privacy 78 */ 79 add_filter( 80 'woocommerce_get_sections_account', 81 function ( $sections ) { 82 $sections['shop_as_client'] = __( 'Shop as Client', 'shop-as-client' ); 83 return $sections; 84 } 85 ); 86 87 /** 88 * Settings - Free plugin only (hidden when PRO is active) 89 */ 90 function shop_as_client_get_settings() { 91 $description = sprintf( 92 /* translators: %1$s: link open, %2$s: link close */ 93 __( 'Available on the %1$sPRO Add-on%2$s', 'shop-as-client' ), 94 '<a href="' . esc_url( SHOPASCLIENT_PRO_OUT_LINK ) . '">', 95 '</a>' 96 ); 97 return array( 98 array( 99 'title' => __( 'Shop as Client', 'shop-as-client' ) . sprintf( 100 ' (Free %s)', 101 SHOPASCLIENT_VERSION 102 ), 103 'type' => 'title', 104 'id' => 'shop_as_client_options', 105 ), 106 // Disabled fields here (shop as client default, create user field default, search on orders, update customer, clear checkout fields, Handler) 107 array( 108 'title' => __( 'Shop as client field default', 'shop-as-client' ), 109 'id' => 'shop_as_client_pro_shop_as_client_default', 110 'type' => 'select', 111 'options' => array( 112 'yes' => __( 'Yes', 'shop-as-client' ), 113 'no' => __( 'No', 'shop-as-client' ), 114 ), 115 'default' => 'yes', 116 'desc' => $description, 117 'custom_attributes' => array( 118 'disabled' => 'disabled', 119 ), 120 ), 121 array( 122 'title' => __( 'Create user field default', 'shop-as-client' ), 123 'id' => 'shop_as_client_pro_create_user_default', 124 'type' => 'select', 125 'options' => array( 126 'yes' => __( 'Yes', 'shop-as-client' ), 127 'no' => __( 'No', 'shop-as-client' ), 128 ), 129 'default' => 'yes', 130 'desc' => $description, 131 'custom_attributes' => array( 132 'disabled' => 'disabled', 133 ), 134 ), 135 array( 136 'title' => __( 'Search on orders', 'shop-as-client' ), 137 'desc' => __( 'By default, the search is only performed on registered users by their registration and billing email, but if you enable this option it will also be done on orders (if not found as user), so you can get data from guest customers.', 'shop-as-client' ) . '<br/>' . $description, 138 'id' => 'shop_as_client_pro_search_orders', 139 'type' => 'select', 140 'options' => array( 141 'yes' => __( 'Yes', 'shop-as-client' ), 142 'no' => __( 'No', 'shop-as-client' ), 143 ), 144 'default' => 'yes', 145 'custom_attributes' => array( 146 'disabled' => 'disabled', 147 ), 148 ), 149 array( 150 'title' => __( 'Update customer', 'shop-as-client' ), 151 'desc' => __( 'Update the customer details on his profile', 'shop-as-client' ) . '<br/>' . $description, 152 'id' => 'shop_as_client_pro_update_customer', 153 'type' => 'select', 154 'options' => array( 155 'yes' => __( 'Yes', 'shop-as-client' ), 156 'no' => __( 'No', 'shop-as-client' ), 157 ), 158 'default' => 'yes', 159 'custom_attributes' => array( 160 'disabled' => 'disabled', 161 ), 162 ), 163 array( 164 'title' => __( 'Clear checkout fields', 'shop-as-client' ), 165 'desc' => ( 166 __( 'Default all checkout fields to blank for Administrators and Shop Managers', 'shop-as-client' ) 167 . 168 '<br/>' 169 . 170 __( 'Only on the classic checkout', 'shop-as-client' ) . '<br/>' . $description 171 ), 172 'id' => 'shop_as_client_pro_empty_checkout', 173 'type' => 'select', 174 'options' => array( 175 'yes' => __( 'Yes', 'shop-as-client' ), 176 'no' => __( 'No', 'shop-as-client' ), 177 ), 178 'default' => 'yes', 179 'custom_attributes' => array( 180 'disabled' => 'disabled', 181 ), 182 ), 183 array( 184 'title' => __( 'Handler on orders list', 'shop-as-client' ), 185 'desc' => __( 'Add a column with the order handler and allow filtering by handler on the admin orders list', 'shop-as-client' ) . '<br/>' . $description, 186 'id' => 'shop_as_client_pro_handler_order_list', 187 'type' => 'select', 188 'options' => array( 189 'yes' => __( 'Yes', 'shop-as-client' ), 190 'no' => __( 'No', 'shop-as-client' ), 191 ), 192 'default' => 'yes', 193 'custom_attributes' => array( 194 'disabled' => 'disabled', 195 ), 196 ), 197 array( 198 'type' => 'sectionend', 199 'id' => 'shop_as_client_options', 200 ), 201 ); 202 } 203 add_filter( 204 'woocommerce_get_settings_account', 205 function ( $settings, $current_section ) { 206 if ( 'shop_as_client' === $current_section && ! defined( 'SHOPASCLIENT_PRO_PLUGIN_FILE' ) ) { 207 return shop_as_client_get_settings(); 208 } 209 return $settings; 210 }, 211 10, 212 2 213 ); 199 214 200 215 /**
Note: See TracChangeset
for help on using the changeset viewer.