本文整理汇总了PHP中GFCommon::send_admin_notification方法的典型用法代码示例。如果您正苦于以下问题:PHP GFCommon::send_admin_notification方法的具体用法?PHP GFCommon::send_admin_notification怎么用?PHP GFCommon::send_admin_notification使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFCommon
的用法示例。
在下文中一共展示了GFCommon::send_admin_notification方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fulfill_order
public static function fulfill_order(&$entry, $transaction_id, $amount)
{
$config = self::get_config_by_entry($entry);
if (!$config) {
self::log_error("Order can't be fulfilled because feed wasn't found for form: {$entry["form_id"]}");
return;
}
$form = RGFormsModel::get_form_meta($entry["form_id"]);
if ($config["meta"]["delay_post"]) {
self::log_debug("Creating post.");
RGFormsModel::create_post($form, $entry);
}
if (isset($config["meta"]["delay_notifications"])) {
//sending delayed notifications
GFCommon::send_notifications($config["meta"]["selected_notifications"], $form, $entry, true, "form_submission");
} else {
//sending notifications using the legacy structure
if ($config["meta"]["delay_notification"]) {
self::log_debug("Sending admin notification.");
GFCommon::send_admin_notification($form, $entry);
}
if ($config["meta"]["delay_autoresponder"]) {
self::log_debug("Sending user notification.");
GFCommon::send_user_notification($form, $entry);
}
}
self::log_debug("Before gform_paypal_fulfillment.");
do_action("gform_paypal_fulfillment", $entry, $config, $transaction_id, $amount);
}
示例2: send_emails
public static function send_emails($form, $lead)
{
$disable_user_notification = apply_filters("gform_disable_user_notification_{$form["id"]}", apply_filters("gform_disable_user_notification", false, $form, $lead), $form, $lead);
if (!$disable_user_notification) {
GFCommon::send_user_notification($form, $lead);
}
$disable_admin_notification = apply_filters("gform_disable_admin_notification_{$form["id"]}", apply_filters("gform_disable_admin_notification", false, $form, $lead), $form, $lead);
if (!$disable_admin_notification) {
GFCommon::send_admin_notification($form, $lead);
}
}
示例3: fulfill_order
public static function fulfill_order(&$entry, $transaction_id, $amount)
{
$form = RGFormsModel::get_form_meta($entry["form_id"]);
$config = self::get_config($entry["form_id"]);
if ($config && $config["meta"]["delay_post"]) {
self::$log->LogDebug("Creating post.");
RGFormsModel::create_post($form, $entry);
}
if ($config && $config["meta"]["delay_notification"]) {
self::$log->LogDebug("Sending admin notification.");
GFCommon::send_admin_notification($form, $entry);
}
if ($config && $config["meta"]["delay_autoresponder"]) {
self::$log->LogDebug("Sending user notification.");
GFCommon::send_user_notification($form, $entry);
}
self::$log->LogDebug("Before gform_paypal_fulfillment.");
do_action("gform_paypal_fulfillment", $entry, $config, $transaction_id, $amount);
}
示例4: resend_notifications
public static function resend_notifications()
{
check_admin_referer('gf_resend_notifications', 'gf_resend_notifications');
$leads = rgpost('leadIds');
// may be a single ID or an array of IDs
$leads = !is_array($leads) ? array($leads) : $leads;
$form = RGFormsModel::get_form_meta(rgpost('formId'));
if (empty($leads) || empty($form)) {
_e("There was an error while resending the notifications.", "gravityforms");
die;
}
$send_admin = rgpost('sendAdmin');
$send_user = rgpost('sendUser');
$override_options = array();
$validation_errors = array();
if (rgpost('sendTo')) {
if (rgpost('sendTo') && GFCommon::is_invalid_or_empty_email(rgpost('sendTo'))) {
$validation_errors[] = __("The <strong>Send To</strong> email address provided is not valid.", "gravityforms");
}
if (!empty($validation_errors)) {
echo count($validation_errors) > 1 ? '<ul><li>' . implode('</li><li>', $validation_errors) . '</li></ul>' : $validation_errors[0];
die;
}
$override_options['to'] = rgpost('sendTo');
$override_options['bcc'] = '';
// overwrite bcc settings
}
foreach ($leads as $lead_id) {
$lead = RGFormsModel::get_lead($lead_id);
if ($send_admin) {
GFCommon::send_admin_notification($form, $lead, $override_options);
}
if ($send_user) {
GFCommon::send_user_notification($form, $lead, $override_options);
}
}
die;
}
示例5: fulfill_order
/**
* Fulfill order
*
* @param array $entry
*/
public function fulfill_order($entry)
{
$feed = get_pronamic_gf_pay_feed_by_entry_id(rgar($entry, 'id'));
if (null !== $feed) {
$this->maybe_update_user_role($entry, $feed);
$form = RGFormsModel::get_form_meta($entry['form_id']);
// Delay post creation
// @see https://github.com/gravityforms/gravityforms/blob/1.8.20.5/forms_model.php#L2383
// @see https://github.com/gravityforms/gravityformspaypal/blob/1.10.3/paypal.php#L2411-L2415
if ($feed->delay_post_creation) {
RGFormsModel::create_post($form, $entry);
}
// Delay Aweber
// @see https://github.com/gravityforms/gravityformsaweber/blob/1.4.2/aweber.php#L1167-L1197
if ($feed->delay_aweber_subscription && Pronamic_WP_Pay_Class::method_exists('GFAWeber', 'export')) {
call_user_func(array('GFAWeber', 'export'), $entry, $form, false);
// @since 1.3.0
// @see https://github.com/gravityforms/gravityformsaweber/blob/2.2.1/aweber.php#L48-L50
// @see https://github.com/gravityforms/gravityforms/blob/1.9.10.15/includes/addon/class-gf-feed-addon.php#L43
if (function_exists('gf_aweber')) {
$addon = gf_aweber();
if (method_exists($addon, 'maybe_process_feed')) {
$addon->maybe_process_feed($entry, $form);
}
}
}
// Delay Campaign Monitor
if ($feed->delay_campaignmonitor_subscription) {
// @see https://github.com/gravityforms/gravityformscampaignmonitor/blob/2.5.1/campaignmonitor.php#L1184
if (Pronamic_WP_Pay_Class::method_exists('GFCampaignMonitor', 'export')) {
call_user_func(array('GFCampaignMonitor', 'export'), $entry, $form, false);
}
// @since 1.3.0
// @see https://github.com/gravityforms/gravityformscampaignmonitor/blob/3.3.2/campaignmonitor.php#L48-L50
// @see https://github.com/gravityforms/gravityforms/blob/1.9.10.15/includes/addon/class-gf-feed-addon.php#L43
if (function_exists('gf_campaignmonitor')) {
$addon = gf_campaignmonitor();
if (method_exists($addon, 'maybe_process_feed')) {
$addon->maybe_process_feed($entry, $form);
}
}
}
// Delay Mailchimp
if ($feed->delay_mailchimp_subscription) {
// @see https://github.com/gravityforms/gravityformsmailchimp/blob/2.4.5/mailchimp.php#L1512
if (Pronamic_WP_Pay_Class::method_exists('GFMailChimp', 'export')) {
call_user_func(array('GFMailChimp', 'export'), $entry, $form, false);
}
// @since 1.3.0
// @see https://github.com/gravityforms/gravityformsmailchimp/blob/3.6.3/mailchimp.php#L48-L50
// @see https://github.com/gravityforms/gravityforms/blob/1.9.10.15/includes/addon/class-gf-feed-addon.php#L43
if (function_exists('gf_mailchimp')) {
$addon = gf_mailchimp();
if (method_exists($addon, 'maybe_process_feed')) {
$addon->maybe_process_feed($entry, $form);
}
}
}
// Delay Zapier
// @see https://github.com/gravityforms/gravityformszapier/blob/1.4.2/zapier.php#L469-L533
if ($feed->delay_zapier && Pronamic_WP_Pay_Class::method_exists('GFZapier', 'send_form_data_to_zapier')) {
call_user_func(array('GFZapier', 'send_form_data_to_zapier'), $entry, $form);
}
// Delay user registration
// @see https://github.com/gravityforms/gravityformsuserregistration/blob/2.0/userregistration.php#L2133
if ($feed->delay_user_registration && Pronamic_WP_Pay_Class::method_exists('GFUser', 'gf_create_user')) {
call_user_func(array('GFUser', 'gf_create_user'), $entry, $form, false);
}
// Delay notifications
// Determine if the feed has Gravity Form 1.7 Feed IDs
if ($feed->has_delayed_notifications()) {
// @see https://bitbucket.org/Pronamic/gravityforms/src/42773f75ad7ad9ac9c31ce149510ff825e4aa01f/common.php?at=1.7.8#cl-1512
GFCommon::send_notifications($feed->delay_notification_ids, $form, $entry, true, 'form_submission');
}
if ($feed->delay_admin_notification && Pronamic_WP_Pay_Class::method_exists('GFCommon', 'send_admin_notification')) {
// https://github.com/gravityforms/gravityforms/blob/1.8.9/common.php#L1265-L1270
GFCommon::send_admin_notification($form, $entry);
}
if ($feed->delay_user_notification && Pronamic_WP_Pay_Class::method_exists('GFCommon', 'send_user_notification')) {
// https://github.com/gravityforms/gravityforms/blob/1.8.9/common.php#L1258-L1263
GFCommon::send_user_notification($form, $entry);
}
}
// The Gravity Forms PayPal Add-On executes the 'gform_paypal_fulfillment' action
do_action('gform_ideal_fulfillment', $entry, $feed);
}
示例6: fulfill_order
public static function fulfill_order(&$entry, $transaction_id, $amount)
{
$form = RGFormsModel::get_form_meta($entry["form_id"]);
$config = self::get_config($entry["form_id"]);
if ($config && $config["meta"]["delay_post"]) {
RGFormsModel::create_post($form, $entry);
}
if ($config && $config["meta"]["delay_notification"]) {
GFCommon::send_admin_notification($form, $entry);
}
if ($config && $config["meta"]["delay_autoresponder"]) {
GFCommon::send_user_notification($form, $entry);
}
do_action("gform_paypal_fulfillment", $entry, $config, $transaction_id, $amount);
}
示例7: fulfill_order
public static function fulfill_order($entry, $transaction_id, $initial_payment_amount, $subscription_amount)
{
$form = RGFormsModel::get_form_meta($entry["form_id"]);
$config = self::get_config_by_entry($entry["id"]);
if ($config) {
self::log_debug("Creating post.");
RGFormsModel::create_post($form, $entry);
self::log_debug("Post created.");
self::log_debug("Sending admin notification.");
GFCommon::send_admin_notification($form, $entry);
self::log_debug("Sending user notification.");
GFCommon::send_user_notification($form, $entry);
}
do_action("gform_paypalpro_fulfillment", $entry, $config, $transaction_id, $initial_payment_amount, $subscription_amount);
}