PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 1.9.13 All 162 releases
woocommerce-pos / includes / Services / Settings / License_Section.php

License_Section.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.18, at includes/Services/Settings/License_Section.php

55 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * License Settings Section.
4 *
5 * @package WCPOS\WooCommercePOS
6 */
7
8 namespace WCPOS\WooCommercePOS\Services\Settings;
9
10 /**
11 * The License Settings Section.
12 *
13 * In the free plugin this is a shim: the view is whatever the Pro plugin
14 * injects via the woocommerce_pos_license_settings filter (empty array
15 * otherwise). A follow-up Pro PR replaces the filter hook with a real
16 * registered section via woocommerce_pos_register_settings_sections.
17 *
18 * NOTE: write() is not overridden — it inherits Abstract_Section::write()
19 * and persists to woocommerce_pos_settings_license — but read() never
20 * consults that option; persisted data is silently ignored until Pro
21 * overrides this section. (Legacy save_settings('license') behaved the
22 * same way; preserved deliberately.)
23 */
24 class License_Section extends Abstract_Section {
25 /**
26 * Section id.
27 */
28 public function id(): string {
29 return 'license';
30 }
31
32 /**
33 * No defaults; the view is Pro-injected.
34 */
35 public function defaults(): array {
36 return array();
37 }
38
39 /**
40 * Read the license view from the Pro-injected filter.
41 */
42 public function read(): array {
43 /**
44 * Filters the license settings.
45 *
46 * @since 1.0.0
47 *
48 * @param array $settings The license settings.
49 *
50 * @hook woocommerce_pos_license_settings
51 */
52 return apply_filters( 'woocommerce_pos_license_settings', array() );
53 }
54 }
55