function MCAPI::campaignUpdate in Mailchimp 6.2
Same name and namespace in other branches
- 5.2 MCAPI.class.php \MCAPI::campaignUpdate()
- 5 MCAPI.class.php \MCAPI::campaignUpdate()
- 6 MCAPI.class.php \MCAPI::campaignUpdate()
- 7 MCAPI.class.php \MCAPI::campaignUpdate()
Update just about any setting for a campaign that has <em>not</em> been sent. See campaignCreate() for details.
Caveats:<br/><ul> <li>If you set list_id, all segmentation options will be deleted and must be re-added.</li> <li>If you set template_id, you need to follow that up by setting it's 'content'</li> <li>If you set segment_opts, you should have tested your options against campaignSegmentTest() as campaignUpdate() will not allow you to set a segment that includes no members.</li></ul>
Related
@example mcapi_campaignUpdate.php @example mcapi_campaignUpdateAB.php @example xml-rpc_campaignUpdate.php @example xml-rpc_campaignUpdateAB.php
Parameters
string $cid the Campaign Id to update:
string $name the parameter name ( see campaignCreate() ). For items in the <strong>options</strong> array, this will be that parameter's name (subject, from_email, etc.). Additional parameters will be that option name (content, segment_opts). "type_opts" will be the name of the type - rss, auto, trans, etc.:
mixed $value an appropriate value for the parameter ( see campaignCreate() ). For items in the <strong>options</strong> array, this will be that parameter's value. For additional parameters, this is the same value passed to them.:
Return value
boolean true if the update succeeds, otherwise an error will be thrown
File
- ./
MCAPI.class.php, line 367
Class
Code
function campaignUpdate($cid, $name, $value) {
$params = array();
$params["cid"] = $cid;
$params["name"] = $name;
$params["value"] = $value;
return $this
->callServer("campaignUpdate", $params);
}