Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @snippet WooCommerce - Fortnox plugin by Redlight Media - Update Article name to article in Fortnox via functions.php
- * @author Redlight Media AB / Christopher Hedqvist
- * @compatible WooCommerce 3.5.3
- */
- function redlight_update_article( $article, $product_id) {
- $WC_Product = wc_get_product($product_id);
- $article->Article['Description'] = $WC_Product->get_name();
- return $article;
- }
- add_filter('obj_fortnox_article_data_before_update', 'redlight_update_article', 10, 2 );
Add Comment
Please, Sign In to add comment