Метод | Описание | |
---|---|---|
background_installer ( string $plugin_to_install_id, array $plugin_to_install ) | Install a plugin from .org in the background via a cron job (used by installer - opt in). | |
check_version ( ) | Check WooCommerce version and run the updater is required. | |
create_pages ( ) | Create pages that the plugin relies on, storing page id's in variables. | |
create_roles ( ) | Create roles and capabilities. | |
cron_schedules ( array $schedules ) : array | Add more cron schedules. | |
in_plugin_update_message ( $args ) | Show plugin changes. Code adapted from W3 Total Cache. | |
init ( ) | Hook in tabs. | |
init_background_updater ( ) | Init background updates | |
install ( ) | Install WC. | |
install_actions ( ) | Install actions when a update button is clicked within the admin area. | |
plugin_action_links ( mixed $links ) : array | Show action links on the plugin screen. | |
plugin_row_meta ( mixed $links, mixed $file ) : array | Show row meta on the plugin screen. | |
remove_roles ( ) | woocommerce_remove_roles function. | |
update_db_version ( string $version = null ) | Update DB version to current. | |
wpmu_drop_tables ( array $tables ) : string[] | Uninstall tables when MU blog is deleted. |
Метод | Описание | |
---|---|---|
create_cron_jobs ( ) | Create cron jobs (clear them first). | |
create_files ( ) | Create files/directories. | |
create_options ( ) | Default options. | |
create_tables ( ) | Set up the database tables which the plugin needs to function. | |
create_terms ( ) | Add the default terms for WC taxonomies - product types and order statuses. Modify this at your own risk. | |
format_plugin_slug ( string $key ) : string | Get slug from path | |
get_core_capabilities ( ) : array | Get capabilities for WooCommerce - these are assigned to admin/shop manager during installation or reset. | |
get_schema ( ) : string | Get Table schema. | |
parse_update_notice ( string $content, string $new_version ) : string | Parse update notice from readme file. | |
update ( ) | Push all needed DB updates to the queue for processing. | |
update_wc_version ( ) | Update WC version to current. |
public static background_installer ( string $plugin_to_install_id, array $plugin_to_install ) | ||
$plugin_to_install_id | string | |
$plugin_to_install | array |
public static check_version ( ) |
public static create_pages ( ) |
public static create_roles ( ) |
public static cron_schedules ( array $schedules ) : array | ||
$schedules | array | |
Результат | array |
public static in_plugin_update_message ( $args ) |
public static init_background_updater ( ) |
public static install_actions ( ) |
public static plugin_action_links ( mixed $links ) : array | ||
$links | mixed | Plugin Action links |
Результат | array |
public static remove_roles ( ) |
public static update_db_version ( string $version = null ) | ||
$version | string |
public static wpmu_drop_tables ( array $tables ) : string[] | ||
$tables | array | |
Результат | string[] |