WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_Post_Types::product_data_visibility() public WC 1.0

Output product visibility options.

Это метод класса: WC_Admin_Post_Types{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WC_Admin_Post_Types = new WC_Admin_Post_Types();
$WC_Admin_Post_Types->product_data_visibility();

Код WC Admin Post Types::product data visibility: woocommerce/includes/admin/class-wc-admin-post-types.php WC 4.5.2

<?php
public function product_data_visibility() {
	global $post, $thepostid, $product_object;

	if ( 'product' !== $post->post_type ) {
		return;
	}

	$thepostid          = $post->ID;
	$product_object     = $thepostid ? wc_get_product( $thepostid ) : new WC_Product();
	$current_visibility = $product_object->get_catalog_visibility();
	$current_featured   = wc_bool_to_string( $product_object->get_featured() );
	$visibility_options = wc_get_product_visibility_options();
	?>
	<div class="misc-pub-section" id="catalog-visibility">
		<?php esc_html_e( 'Catalog visibility:', 'woocommerce' ); ?>
		<strong id="catalog-visibility-display">
			<?php

			echo isset( $visibility_options[ $current_visibility ] ) ? esc_html( $visibility_options[ $current_visibility ] ) : esc_html( $current_visibility );

			if ( 'yes' === $current_featured ) {
				echo ', ' . esc_html__( 'Featured', 'woocommerce' );
			}
			?>
		</strong>

		<a href="#catalog-visibility" class="edit-catalog-visibility hide-if-no-js"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a>

		<div id="catalog-visibility-select" class="hide-if-js">

			<input type="hidden" name="current_visibility" id="current_visibility" value="<?php echo esc_attr( $current_visibility ); ?>" />
			<input type="hidden" name="current_featured" id="current_featured" value="<?php echo esc_attr( $current_featured ); ?>" />

			<?php
			echo '<p>' . esc_html__( 'This setting determines which shop pages products will be listed on.', 'woocommerce' ) . '</p>';

			foreach ( $visibility_options as $name => $label ) {
				echo '<input type="radio" name="_visibility" id="_visibility_' . esc_attr( $name ) . '" value="' . esc_attr( $name ) . '" ' . checked( $current_visibility, $name, false ) . ' data-label="' . esc_attr( $label ) . '" /> <label for="_visibility_' . esc_attr( $name ) . '" class="selectit">' . esc_html( $label ) . '</label><br />';
			}

			echo '<br /><input type="checkbox" name="_featured" id="_featured" ' . checked( $current_featured, 'yes', false ) . ' /> <label for="_featured">' . esc_html__( 'This is a featured product', 'woocommerce' ) . '</label><br />';
			?>
			<p>
				<a href="#catalog-visibility" class="save-post-visibility hide-if-no-js button"><?php esc_html_e( 'OK', 'woocommerce' ); ?></a>
				<a href="#catalog-visibility" class="cancel-post-visibility hide-if-no-js"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></a>
			</p>
		</div>
	</div>
	<?php
}