Advertisement
verygoodplugins

Untitled

Apr 22nd, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. function apply_tags_in_shopify( $user_id, $tags )
  2.  
  3.     $cust_array = array(
  4.         'tags' => implode(',', $tags)
  5.     );
  6.  
  7.     $info = array('customer' => $cust_array );
  8.  
  9.     $args = array(
  10.  
  11.         'headers' => array('Authorization' => 'Basic ' . base64_encode($credentials) ),
  12.         'method' => 'PUT',
  13.         'body' => json_encode( $info )
  14.  
  15.     );
  16.  
  17.     $response = wp_remote_get( '/admin/customers/#1234.json', $args );
  18.  
  19. }
  20.  
  21. add_action( 'wpf_tags_applied', 'apply_tags_in_shopify', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement