WC_Settings_Advanced::get_settings_for_woocommerce_com_section
Get settings for the WooCommerce.com section.
Метод класса: WC_Settings_Advanced{}
Хуки из метода
Возвращает
Массив.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_settings_for_woocommerce_com_section();
Код WC_Settings_Advanced::get_settings_for_woocommerce_com_section() WC Settings Advanced::get settings for woocommerce com section WC 10.4.3
protected function get_settings_for_woocommerce_com_section() {
$tracking_info_text = sprintf( '<a href="%s" target="_blank">%s</a>', 'https://woocommerce.com/usage-tracking', esc_html__( 'WooCommerce.com Usage Tracking Documentation', 'woocommerce' ) );
$settings =
array(
array(
'title' => esc_html__( 'Usage Tracking', 'woocommerce' ),
'type' => 'title',
'id' => 'tracking_options',
'desc' => __( 'Gathering usage data allows us to tailor your store setup experience, offer more relevant content, and help make WooCommerce better for everyone.', 'woocommerce' ),
),
array(
'title' => __( 'Enable tracking', 'woocommerce' ),
'desc' => __( 'Allow usage of WooCommerce to be tracked', 'woocommerce' ),
/* Translators: %s URL to tracking info screen. */
'desc_tip' => sprintf( esc_html__( 'To opt out, leave this box unticked. Your store remains untracked, and no data will be collected. Read about what usage data is tracked at: %s.', 'woocommerce' ), $tracking_info_text ),
'id' => 'woocommerce_allow_tracking',
'type' => 'checkbox',
'checkboxgroup' => 'start',
'default' => 'no',
'autoload' => true,
),
array(
'type' => 'sectionend',
'id' => 'tracking_options',
),
array(
'title' => esc_html__( 'Marketplace suggestions', 'woocommerce' ),
'type' => 'title',
'id' => 'marketplace_suggestions',
'desc' => __( 'We show contextual suggestions for official extensions that may be helpful to your store.', 'woocommerce' ),
),
array(
'title' => __( 'Show Suggestions', 'woocommerce' ),
'desc' => __( 'Display suggestions within WooCommerce', 'woocommerce' ),
'desc_tip' => esc_html__( 'Leave this box unchecked if you do not want to pull suggested extensions from WooCommerce.com.', 'woocommerce' ),
'id' => 'woocommerce_show_marketplace_suggestions',
'type' => 'checkbox',
'checkboxgroup' => 'start',
'default' => 'yes',
'autoload' => false,
),
array(
'type' => 'sectionend',
'id' => 'marketplace_suggestions',
),
);
return apply_filters( 'woocommerce_com_integration_settings', $settings );
}