Automattic\WooCommerce\Admin\Features\Blueprint\Exporters
ExportWCTaskOptions{}
Class ExportWCTaskOptions
This class exports WooCommerce task options and implements the StepExporter and HasAlias interfaces.
Хуков нет.
Использование
$ExportWCTaskOptions = new ExportWCTaskOptions(); // use class methods
Методы
- public export()
- public get_alias()
- public get_description()
- public get_label()
- public get_step_name()
Заметки
- Пакет: Automattic\WooCommerce\Admin\Features\Blueprint\Exporters
Код ExportWCTaskOptions{} ExportWCTaskOptions{} WC 9.7.1
class ExportWCTaskOptions implements StepExporter, HasAlias { use UseWPFunctions; /** * Export WooCommerce task options. * * @return SetSiteOptions */ public function export() { $step = new SetSiteOptions( array( 'woocommerce_admin_customize_store_completed' => $this->wp_get_option( 'woocommerce_admin_customize_store_completed', 'no' ), 'woocommerce_task_list_tracked_completed_actions' => $this->wp_get_option( 'woocommerce_task_list_tracked_completed_actions', array() ), ) ); $step->set_meta_values( array( 'plugin' => 'woocommerce', 'alias' => $this->get_alias(), ) ); return $step; } /** * Get the name of the step. * * @return string */ public function get_step_name() { return 'setOptions'; } /** * Get the alias for this exporter. * * @return string */ public function get_alias() { return 'setWCTaskOptions'; } /** * Return label used in the frontend. * * @return string */ public function get_label() { return __( 'Task Configurations', 'woocommerce' ); } /** * Return description used in the frontend. * * @return string */ public function get_description() { return __( 'It includes the task configurations for WooCommerce.', 'woocommerce' ); } }