WC_Settings_Advanced::get_settings_for_woocommerce_com_section()protectedWC 1.0

Get settings for the Woo.com section.

Method of the class: WC_Settings_Advanced{}

Hooks from the method

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_settings_for_woocommerce_com_section();

WC_Settings_Advanced::get_settings_for_woocommerce_com_section() code WC 8.7.0

protected function get_settings_for_woocommerce_com_section() {
	$tracking_info_text = sprintf( '<a href="%s" target="_blank">%s</a>', 'https://woo.com/usage-tracking', esc_html__( 'Woo.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 make WooCommerce better — your store will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense.', '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'      => false,
			),
			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 Woo.com. You will see a static list of extensions instead.', '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 );
}