PluginProbe
Additional Terms Lite for WooCommerce / 1.6.2
Additional Terms Lite for WooCommerce v1.6.2
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / src / Settings / Register.php

Register.php in Additional Terms Lite for WooCommerce 1.6.2, at src/Settings/Register.php

48 lines 893 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin settings registerer.
4 *
5 * @author MyPreview (Github: @mahdiyazdani, @gooklani, @mypreview)
6 *
7 * @since 1.6.0
8 *
9 * @package woo-additional-terms
10 */
11
12 namespace Woo_Additional_Terms\Settings;
13
14 /**
15 * Register plugin settings fields.
16 */
17 class Register {
18
19 /**
20 * Setup hooks and filters.
21 *
22 * @since 1.6.0
23 *
24 * @return void
25 */
26 public function setup() {
27
28 add_filter( 'woocommerce_get_settings_pages', array( $this, 'settings' ) );
29 }
30
31 /**
32 * We will add our settings pages using the following filter, so that the code that
33 * being used to hook into that filter is init by a filter later than `wp_loaded`.
34 *
35 * @since 1.6.0
36 *
37 * @param array $settings Setting pages.
38 *
39 * @return array
40 */
41 public function settings( $settings ) {
42
43 // Add our settings page.
44 $settings[] = woo_additional_terms()->service( 'settings' );
45 return $settings;
46 }
47 }
48