Automattic\WooCommerce\Internal\Admin

SystemStatusReport::render_features()publicWC 1.0

Render features rows.

Метод класса: SystemStatusReport{}

Hooks from the method

Return

null. Nothing.

Usage

$SystemStatusReport = new SystemStatusReport();
$SystemStatusReport->render_features();

Code of SystemStatusReport::render_features() WC 7.1.0

<?php
public function render_features() {
	/**
	 * Filter the admin feature configs.
	 *
	 * @since 6.5.0
	 */
	$features          = apply_filters( 'woocommerce_admin_get_feature_config', wc_admin_get_feature_config() );
	$enabled_features  = array_filter( $features );
	$disabled_features = array_filter(
		$features,
		function( $feature ) {
			return empty( $feature );
		}
	);

	?>
		<tr>
			<td data-export-label="Enabled Features">
				<?php esc_html_e( 'Enabled Features', 'woocommerce' ); ?>:
			</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Which features are enabled?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
					echo esc_html( implode( ', ', array_keys( $enabled_features ) ) )
				?>
			</td>
		</tr>

		<tr>
			<td data-export-label="Disabled Features">
				<?php esc_html_e( 'Disabled Features', 'woocommerce' ); ?>:
			</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Which features are disabled?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
					echo esc_html( implode( ', ', array_keys( $disabled_features ) ) )
				?>
			</td>
		</tr>
	<?php
}