Skip to content

Commit 7410fe3

Browse files
committed
Updated example
1 parent d707b1f commit 7410fe3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

wc-api-manager-php-library.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@
8686
$wcam_lib = new WC_AM_Client_2_9( __FILE__, '', '1.2', 'plugin', 'http://wc/', 'WooCommerce API Manager PHP Library for Plugins and Themes', 'wc-am-text' );
8787

8888
/**
89-
* Custom men Plugin example.
89+
* Custom top level or top level submenu.
9090
*
91-
* Last argument to the WC_AM_Client_2_9 class is to prevent the not activate yet admin message from being displayed, which may not be necessary with a custom menu.
91+
* Last argument to the WC_AM_Client_2_9 class is to prevent the not activated yet admin message from being displayed, which may not be necessary with a custom menu.
9292
*
9393
* Example using add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null );
9494
*
95-
* Arguments:
95+
* Argument must be passed as an array:
9696
*
97-
* $borderless_license_menu = array( 'menu_type' => 'add_submenu_page', 'parent_slug' => 'borderless.php', 'page_title' => '', 'menu_title' => '', 'capability' => '', 'menu_slug' => '', 'menu_slug' => '', 'callback' => '', 'position' => '' );
97+
* $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '', $custom_menu = array(), $inactive_notice = true
9898
* Only arguments with values need to be provided.
9999
*
100100
* Custom menus allowed:
@@ -104,7 +104,8 @@
104104
* add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '', $position = null );
105105
*
106106
*/
107-
// $license_menu = array( 'menu_type' => 'add_submenu_page', 'parent_slug' => 'borderless.php', 'page_title' => 'License Activation', 'menu_title' => 'License' );
108107

109-
// $license = new WC_AM_Client_2_9( __FILE__, 32960, '1.2', 'plugin', 'http://wc', 'WooCommerce API Manager PHP Library for Plugins and Themes', 'wc-am-text', $license_menu, false );
108+
// $wcam_lib_custom_menu = array( 'menu_type' => 'add_submenu_page', 'parent_slug' => 'my-plugin.php', 'page_title' => 'My Plugin License Activation', 'menu_title' => 'API Key' );
109+
110+
// $wcam_lib = new WC_AM_Client_2_9( __FILE__, 168804, '1.2', 'plugin', 'http://wc/', 'WooCommerce API Manager PHP Library for Plugins and Themes', 'wc-am-text', $wcam_lib_custom_menu, false );
110111
}

0 commit comments

Comments
 (0)