Remove duplicate product link from WooCommerce Page Row Actions

  • Open
  • gagandeep
    Participant
    March 20, 2020 at 7:12 am #5460
    gagandeep

    Hi,

    I am trying to remove the duplicate link from the WooCommerce Admin Product listing (page_row_actions).

    //Remove duplicate button from product list
    function my_duplicate_post_link($actions, $post) {
    $product = get_product( $post->ID );
    //if( $product->is_type( 'booking' ) ){
    //unset($actions['edit']);
    unset($actions['admin_action_duplicate_product']);
    unset($actions['dupe_link']);
    unset($actions['dupe_links']);
    unset($actions['duplicate']);
    unset($actions['duplicate_product']);
    unset($actions['duplicate_product_action']);
    return $actions;
    //}
    }
    add_filter('post_row_actions', 'my_duplicate_post_link', 10, 1);
    add_filter('page_row_actions', 'my_duplicate_post_link', 10, 1);

    Thanks