PHP Class WC_Admin_Duplicate_Product

Mostra file Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
dupe_button ( ) Show the dupe product link in admin.
dupe_link ( array $actions, WP_Post $post ) : array Show the "Duplicate" link in admin products list.
duplicate_product ( mixed $post, integer $parent, string $post_status = '' ) : integer Function to create the duplicate of the product.
duplicate_product_action ( ) Duplicate a product action.

Private Methods

Method Description
duplicate_post_meta ( mixed $id, mixed $new_id ) Copy the meta information of a post to another post.
duplicate_post_taxonomies ( mixed $id, mixed $new_id, mixed $post_type ) Copy the taxonomies of a post to another post.
get_product_to_duplicate ( mixed $id ) : WP_Post | boolean Get a product from the database to duplicate.

Method Details

__construct() public method

Constructor.
public __construct ( )

dupe_button() public method

Show the dupe product link in admin.
public dupe_button ( )

duplicate_product() public method

Function to create the duplicate of the product.
public duplicate_product ( mixed $post, integer $parent, string $post_status = '' ) : integer
$post mixed
$parent integer (default: 0)
$post_status string (default: '')
return integer

duplicate_product_action() public method

Duplicate a product action.