|
25 | 25 | */
|
26 | 26 |
|
27 | 27 | // Load the WC_AM_Client client class if it exists.
|
28 |
| -if ( ! class_exists( 'WC_AM_Client_2_11_0' ) ) { |
| 28 | +if ( ! class_exists( 'WC_AM_Client_2_11_1' ) ) { |
29 | 29 | /**
|
30 | 30 | * This library does not use Composer autoloading to support a wider range of implementations.
|
31 | 31 | *
|
|
37 | 37 | }
|
38 | 38 |
|
39 | 39 | // Instantiate the WC_AM_Client class object if the WC_AM_Client class is loaded.
|
40 |
| -if ( class_exists( 'WC_AM_Client_2_11_0' ) ) { |
| 40 | +if ( class_exists( 'WC_AM_Client_2_11_1' ) ) { |
41 | 41 | /**
|
42 | 42 | * This file is only an example that includes a plugin header, and this code is used to instantiate the client object.
|
43 | 43 | *
|
|
69 | 69 | *
|
70 | 70 | * @NOTE Replace the dummy values with your own.
|
71 | 71 | */
|
72 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, 123, null, '1.0', 'theme', 'https://example.org/example-theme', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
| 72 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, 123, null, '1.0', 'theme', 'https://example.org/example-theme', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
73 | 73 |
|
74 | 74 | /**
|
75 | 75 | * Plugin example (default menu).
|
|
80 | 80 | */
|
81 | 81 |
|
82 | 82 | // If the Product ID is not set the customer will see a form field when activating the API Key that requires the Product ID along with a form field for the API Key.
|
83 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, '', null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
| 83 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, '', null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
84 | 84 |
|
85 | 85 | // Setting the Product ID below will eliminate the required form field for the customer to enter the Product ID, so the customer will only be required to enter the API Key.
|
86 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, 456, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
| 86 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, 456, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
87 | 87 |
|
88 | 88 | // If you offer the product as a variable product where the customer can switch to another product with a different Product ID, then do not set the Product ID here, but you may pass a product parent ID instead (generally not recommended unless you are using subscription switches and not setting a product ID or letting the customer enter it).
|
89 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, null, 789, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
| 89 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, null, 789, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain' ); |
90 | 90 |
|
91 | 91 | /**
|
92 | 92 | * Custom top level or top level submenu.
|
|
99 | 99 | * @see add_options_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null );
|
100 | 100 | * @see add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '', $position = null );
|
101 | 101 | *
|
102 |
| - * Then pass the custom menu settings as an array to the WC_AM_Client_2_11_0 class as shown in the example below. |
| 102 | + * Then pass the custom menu settings as an array to the WC_AM_Client_2_11_1 class as shown in the example below. |
103 | 103 | */
|
104 | 104 |
|
105 | 105 | $wcam_lib_custom_menu = array(
|
|
109 | 109 | 'menu_title' => __( 'Example API Key', 'example-textdomain' ),
|
110 | 110 | );
|
111 | 111 |
|
112 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, 123, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain', $wcam_lib_custom_menu ); |
| 112 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, 123, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain', $wcam_lib_custom_menu ); |
113 | 113 |
|
114 | 114 | /**
|
115 | 115 | * Suppress the inactive notice.
|
116 | 116 | *
|
117 |
| - * When your plugin or theme is activated, the WC_AM_Client_2_11_0 class will display a notice in the admin area if the plugin or theme has not been activated. |
| 117 | + * When your plugin or theme is activated, the WC_AM_Client_2_11_1 class will display a notice in the admin area if the plugin or theme has not been activated. |
118 | 118 | * You can disable this by setting the last argument passed to the client constructor to false.
|
119 | 119 | */
|
120 |
| - $wcam_lib = new WC_AM_Client_2_11_0( __FILE__, 123, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain', null, false ); |
| 120 | + $wcam_lib = new WC_AM_Client_2_11_1( __FILE__, 123, null, '1.2.3', 'plugin', 'https://example.org/example-plugin', __( 'Example WordPress Plugin', 'example-textdomain' ), 'example-textdomain', null, false ); |
121 | 121 | }
|
0 commit comments