$morder->billing->city = $bcity; $morder->billing->state = $bstate; $morder->billing->country = $bcountry; $morder->billing->zip = $bzipcode; $morder->billing->phone = $bphone; //$gateway = pmpro_getOption("gateway"); $morder->gateway = $gateway; $morder->setGateway(); $worked = $morder->updateBilling(); if ($worked) { //send email to member $pmproemail = new PMProEmail(); $pmproemail->sendBillingEmail($current_user, $morder); //send email to admin $pmproemail = new PMProEmail(); $pmproemail->sendBillingAdminEmail($current_user, $morder); } } else { $worked = true; } if ($worked) { //update the user meta too $meta_keys = array("pmpro_bfirstname", "pmpro_blastname", "pmpro_baddress1", "pmpro_baddress2", "pmpro_bcity", "pmpro_bstate", "pmpro_bzipcode", "pmpro_bphone", "pmpro_bemail", "pmpro_CardType", "pmpro_AccountNumber", "pmpro_ExpirationMonth", "pmpro_ExpirationYear"); $meta_values = array($bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bphone, $bemail, $CardType, hideCardNumber($AccountNumber), $ExpirationMonth, $ExpirationYear); pmpro_replaceUserMeta($current_user->ID, $meta_keys, $meta_values); //message $pmpro_msg = sprintf(__('Information updated. <a href="%s">« back to my account</a>', 'pmpro'), pmpro_url("account")); $pmpro_msgt = "pmpro_success"; } else { $pmpro_msg = $morder->error; if (!$pmpro_msg) {