PHP Class WC_Admin_Duplicate_Product

Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Constructor.
public __construct ( )

dupe_button() public méthode

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

duplicate_product() public méthode

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: '')
Résultat integer

duplicate_product_action() public méthode

Duplicate a product action.