add_support_link

The Woocommerce CSV Import add support link function.

Description

add_support_link( $links, $file ); 

Parameters (2)

0. $links
The links.
1. $file
The file.

Usage

  1. if ( !function_exists( 'add_support_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-csv-import/woocommerce-csvimport.php'; 
  3.  
  4. // The links. 
  5. $links = null; 
  6.  
  7. // The file. 
  8. $file = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = add_support_link($links, $file); 
  12.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-csvimport.php  
  1. function add_support_link($links, $file) 
  2. $plugin = plugin_basename(__FILE__); 
  3. if (!current_user_can('install_plugins')) { 
  4. return $links; 
  5. //if($file == $this->plugin_basefile) { 
  6. if ($file == $plugin) { 
  7. $links[] = '<a href="https://allaerd.org/knowledgebase/" target="_blank">' . __('Docs', 'woocommerce-csvimport') . '</a>'; 
  8. $links[] = '<a href="https://allaerd.org/shop/" target="_blank">' . __('Add-ons', 'woocommerce-csvimport') . '</a>'; 
  9.  
  10. return $links;