当前位置: 首页>>代码示例>>PHP>>正文


PHP PMProEmail::sendCancelAdminEmail方法代码示例

本文整理汇总了PHP中PMProEmail::sendCancelAdminEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP PMProEmail::sendCancelAdminEmail方法的具体用法?PHP PMProEmail::sendCancelAdminEmail怎么用?PHP PMProEmail::sendCancelAdminEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMProEmail的用法示例。


在下文中一共展示了PMProEmail::sendCancelAdminEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pmpro_insRecurringStopped

function pmpro_insRecurringStopped($morder)
{
    global $pmpro_error;
    //hook to do other stuff when payments stop
    do_action("pmpro_subscription_recuring_stopped", $last_order);
    $worked = pmpro_changeMembershipLevel(false, $morder->user->ID);
    if ($worked === true) {
        //$pmpro_msg = __("Your membership has been cancelled.", 'pmpro');
        //$pmpro_msgt = "pmpro_success";
        //send an email to the member
        $myemail = new PMProEmail();
        $myemail->sendCancelEmail();
        //send an email to the admin
        $myemail = new PMProEmail();
        $myemail->sendCancelAdminEmail($morder->user, $morder->membership_level->id);
        inslog("Subscription cancelled due to 'recurring stopped' INS notification.");
        return true;
    } else {
        return false;
    }
}
开发者ID:Seravo,项目名称:wp-paid-subscriptions,代码行数:21,代码来源:twocheckout-ins.php

示例2: PMProEmail

global $besecure;
$besecure = false;
global $current_user, $pmpro_msg, $pmpro_msgt, $pmpro_confirm, $pmpro_error;
//if they don't have a membership, send them back to the subscription page
if (empty($current_user->membership_level->ID)) {
    wp_redirect(pmpro_url("levels"));
}
if (isset($_REQUEST['confirm'])) {
    $pmpro_confirm = $_REQUEST['confirm'];
} else {
    $pmpro_confirm = false;
}
if ($pmpro_confirm) {
    $old_level_id = $current_user->membership_level->id;
    $worked = pmpro_changeMembershipLevel(false, $current_user->ID);
    if ($worked === true && empty($pmpro_error)) {
        $pmpro_msg = __("Your membership has been cancelled.", 'pmpro');
        $pmpro_msgt = "pmpro_success";
        //send an email to the member
        $myemail = new PMProEmail();
        $myemail->sendCancelEmail();
        //send an email to the admin
        $myemail = new PMProEmail();
        $myemail->sendCancelAdminEmail($current_user, $old_level_id);
    } else {
        global $pmpro_error;
        $pmpro_msg = $pmpro_error;
        $pmpro_msgt = "pmpro_error";
    }
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:30,代码来源:cancel.php

示例3: ipnlog

            	(1) This order already has "cancelled" status.
            	(2) The user doesn't currently have the level attached to this order.
            */
            if ($last_subscr_order->status == "cancelled") {
                ipnlog("We've already processed this cancellation. Probably originated from WP/PMPro. (Order #" . $last_subscr_order->id . ", Subscription Transaction ID #" . $subscr_id . ")");
            } elseif (!pmpro_hasMembershipLevel($last_subsc_order->membership_id, $user->ID)) {
                ipnlog("This user has a different level than the one associated with this order. Their membership was probably changed by an admin or through an upgrade/downgrade. (Order #" . $last_subscr_order->id . ", Subscription Transaction ID #" . $subscr_id . ")");
            } else {
                pmpro_changeMembershipLevel(0, $last_subscr_order->user_id, 'cancelled');
                ipnlog("Canceled membership for user with id = " . $last_subscr_order->user_id . ". Subscription transaction id = " . $subscr_id . ".");
                //send an email to the member
                $myemail = new PMProEmail();
                $myemail->sendCancelEmail($user);
                //send an email to the admin
                $myemail = new PMProEmail();
                $myemail->sendCancelAdminEmail($user, $last_subscr_order->membership_id);
            }
        }
        pmpro_ipnExit();
    }
}
//Other
//if we got here, this is a different kind of txn
ipnlog("No recurring payment id or item number. txn_type = " . $txn_type);
pmpro_ipnExit();
/*
	Add message to ipnlog string
*/
function ipnlog($s)
{
    global $logstr;
开发者ID:srinivasulurao,项目名称:transcharity,代码行数:31,代码来源:ipnhandler.php


注:本文中的PMProEmail::sendCancelAdminEmail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。