<?php

if (!defined('ABSPATH')) {
  exit;
}

add_action('admin_enqueue_scripts', 'wcpt_copy_element_scripts');

function wcpt_copy_element_scripts()
{
  if (!isset($_GET['post_type']) || $_GET['post_type'] !== 'wc_product_table' || !isset($_GET['page']) || $_GET['page'] !== 'wcpt-edit') {
    return;
  }
  wp_enqueue_script('wcpt-copy-element', WCPT_PLUGIN_URL . 'pro/copy_element/js.js', array('wcpt-controller'), WCPT_VERSION, true);
}
