Hi there,

with this module enabled, if I choose a saved delivery address and change it in the checkout pane, the changes are not taken to the confirmation page. Disabling the module makes it work again. Any idea?

Thanks,
Stefan

Comments

mattcasey’s picture

I just found a bug in this module that prevents saving updates to any orders. The hook uc_mailchimp_order() needs to serialize its data before uc_order_save() gets called using 'presave'.

Here is the correct function:

/**
 * Implementation of hook_order()
 */
function uc_mailchimp_order($op, &$arg1) {
  switch ($op) {
    case 'presave' :
        if(is_array($arg1->uc_mailchimp)) {
            $arg1->uc_mailchimp = serialize($arg1->uc_mailchimp);
        }
    break;
    
    case 'load' :
        $arg1->uc_mailchimp = unserialize($arg1->uc_mailchimp);
    break;
  }
}
mattcasey’s picture

Issue summary: View changes

typo