woocommerce_product_duplicate

woocommerce_product_duplicate

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_product_duplicate') is found 1 times:

  • /includes/admin/class-wc-admin-duplicate-product.php line 116
     
    		$duplicate = $this->product_duplicate( $product );
    
    		// Hook rename to match other woocommerce_product_* hooks, and to move away from depending on a response from the wp_posts table.
    		do_action( 'woocommerce_product_duplicate', $duplicate, $product );
    		wc_do_deprecated_action( 'woocommerce_duplicate_product', array( $duplicate->get_id(), $this->get_product_to_duplicate( $product_id ) ), '3.0', 'Use woocommerce_product_duplicate action instead.' );
    
    		// Redirect to the edit screen for the new draft page.
    		wp_redirect( admin_url( 'post.php?action=edit&post=' . $duplicate->get_id() ) );
    		exit;
    	}
    

See this hook used in plugins: