Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_to_sequence_shortcode( $args ) {
- $post_data = array(
- 'objectID' => 0,
- 'add_list' => $args['id'],
- 'ids' => wp_fusion()->user->get_contact_id()
- );
- $params = wp_fusion()->crm->get_params();
- $params['method'] = 'PUT';
- $params['body'] = json_encode( $post_data );
- $response = wp_remote_post( 'https://api.ontraport.com/1/objects/sequence', $params );
- if( is_wp_error( $response ) ) {
- return $response;
- }
- }
- add_shortcode( 'add_to_sequence', 'add_to_sequence_shortcode' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement