Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
ReviewShippingOptions{}
Review Shipping Options Task
Хуков нет.
Использование
$ReviewShippingOptions = new ReviewShippingOptions(); // use class methods
Методы
- public can_view()
- public get_action_url()
- public get_content()
- public get_id()
- public get_time()
- public get_title()
- public is_complete()
Код ReviewShippingOptions{} ReviewShippingOptions{} WC 9.2.3
class ReviewShippingOptions extends Task { /** * ID. * * @return string */ public function get_id() { return 'review-shipping'; } /** * Title. * * @return string */ public function get_title() { return __( 'Review shipping options', 'woocommerce' ); } /** * Content. * * @return string */ public function get_content() { return ''; } /** * Time. * * @return string */ public function get_time() { return ''; } /** * Task completion. * * @return bool */ public function is_complete() { return get_option( 'woocommerce_admin_reviewed_default_shipping_zones' ) === 'yes'; } /** * Task visibility. * * @return bool */ public function can_view() { return get_option( 'woocommerce_admin_created_default_shipping_zones' ) === 'yes'; } /** * Action URL. * * @return string */ public function get_action_url() { return admin_url( 'admin.php?page=wc-settings&tab=shipping' ); } }