Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function update_product_comment($comment_ID) {
  2. $commentarr = [];
  3. $commentarr['comment_ID'] = $comment_ID;
  4. $commentarr['comment_type'] = 'test';
  5.  
  6. //wp_die(var_dump($commentarr['comment_type'])); <-- COMMENT_TYPE = 'TEST', SO FAR SO GOOD!
  7. wp_update_comment($commentarr); // <--- THE CULPRIT
  8. }
  9. add_action('edit_comment', 'update_product_comment');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement