daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jan 19th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4.  * @snippet       WooCommerce - Fortnox plugin by Redlight Media - Update Article name to article in Fortnox via functions.php
  5.  * @author        Redlight Media AB / Christopher Hedqvist
  6.  * @compatible    WooCommerce 3.5.3
  7.  */
  8. function redlight_update_article( $article, $product_id) {
  9.   $WC_Product = wc_get_product($product_id);
  10.   $article->Article['Description'] = $WC_Product->get_name();
  11.   return $article;
  12. }
  13. add_filter('obj_fortnox_article_data_before_update', 'redlight_update_article', 10, 2 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top