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

WC_Admin_Duplicate_Product::dupe_link() public WC 1.0

Show the "Duplicate" link in admin products list.

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

Хуки из метода
Возвращает

Массив.

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

$WC_Admin_Duplicate_Product = new WC_Admin_Duplicate_Product();
$WC_Admin_Duplicate_Product->dupe_link( $actions, $post );
$actions(массив) (обязательный)
Array of actions.
$post(WP_Post) (обязательный)
Post object.

Код WC_Admin_Duplicate_Product::dupe_link() WC 4.5.2

woocommerce/includes/admin/class-wc-admin-duplicate-product.php
<?php
public function dupe_link( $actions, $post ) {
	global $the_product;

	if ( ! current_user_can( apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ) ) ) {
		return $actions;
	}

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

	// Add Class to Delete Permanently link in row actions.
	if ( empty( $the_product ) || $the_product->get_id() !== $post->ID ) {
		$the_product = wc_get_product( $post );
	}

	if ( 'publish' === $post->post_status && $the_product && 0 < $the_product->get_total_sales() ) {
		$actions['trash'] = sprintf(
			'<a href="%s" class="submitdelete trash-product" aria-label="%s">%s</a>',
			get_delete_post_link( $the_product->get_id(), '', false ),
			/* translators: %s: post title */
			esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash', 'woocommerce' ), $the_product->get_name() ) ),
			esc_html__( 'Trash', 'woocommerce' )
		);
	}

	$actions['duplicate'] = '<a href="' . wp_nonce_url( admin_url( 'edit.php?post_type=product&action=duplicate_product&amp;post=' . $post->ID ), 'woocommerce-duplicate-product_' . $post->ID ) . '" aria-label="' . esc_attr__( 'Make a duplicate from this product', 'woocommerce' )
		. '" rel="permalink">' . esc_html__( 'Duplicate', 'woocommerce' ) . '</a>';

	return $actions;
}