Plugin Directory

Changeset 1919566


Ignore:
Timestamp:
08/03/2018 07:39:46 PM (8 years ago)
Author:
emfluencekc
Message:

Add endpoint to emfl API library. No impact on plugin functionality.

Location:
wp-emfluence/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-emfluence/trunk/emfluence.php

    r1914929 r1919566  
    55Description: Easily add forms to your website for contacts to add or update their details in your emfluence Marketing Platform account.
    66Author: emfluence Digital Marketing
    7 Version: 2.4
     7Version: 2.4.1
    88Author URI: https://www.emfluence.com
    99*/
  • wp-emfluence/trunk/libraries/emfl_platform_api/api.class.inc

    r1421095 r1919566  
    656656  }
    657657
     658  /**
     659   * Emails / sendTransactional
     660   *
     661   * The return value could be FALSE if a transmission error occurred,
     662   * like being blocked by the Platform or a network issue.
     663   *
     664   * Otherwise even bad API calls will get an Emfl_Response object
     665   * that corresponds with the Platform's response format. See here:
     666   * http://apidocs.emailer.emfluence.com/#responses
     667   *
     668   * Don't forget to check the 'success' property before assuming that
     669   * the operation occurred correctly. If an error occurred, the 'errors'
     670   * property will have details.
     671   *
     672   * @param Emfl_Email $email The email object
     673   * @param Emfl_Contact[] $contacts Recipients (will also get saved as contacts)
     674   * @return false|Emfl_Response
     675   * @see https://apidocs.emailer.emfluence.com/v1/endpoints/emails/sendTransactional
     676   */
     677  function emails_sendTransactional( $email, $contacts, $category = NULL, $ignore_suppression = FALSE ) {
     678    $params = array(
     679        'email' => $email,
     680        'contacts' => $contacts
     681    );
     682    if(!empty($category)) $params['transactionalCategory'] = $category;
     683    if($ignore_suppression) $params['ignoreContactSuppression'] = TRUE;
     684    $response = $this->call('emails/sendTransactional', $params);
     685    if(empty($response)) return FALSE; // Transmission error
     686    return $response;
     687  }
     688
    658689
    659690  ///////////////////
  • wp-emfluence/trunk/readme.txt

    r1914929 r1919566  
    33Requires at least: 4.0
    44Tested up to: 4.9.7
    5 Stable tag: 2.4
     5Stable tag: 2.4.1
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5252== Changelog ==
    5353
     54= 2.4.1 =
     55* Add endpoint to emfl API library. No impact on plugin functionality.
     56
    5457= 2.4 =
    5558* Add Hidden custom field type.
Note: See TracChangeset for help on using the changeset viewer.