• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pmpro_getOption函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中pmpro_getOption函数的典型用法代码示例。如果您正苦于以下问题:PHP pmpro_getOption函数的具体用法?PHP pmpro_getOption怎么用?PHP pmpro_getOption使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: PMProGateway_stripe

 function PMProGateway_stripe($gateway = NULL)
 {
     $this->gateway = $gateway;
     $this->gateway_environment = pmpro_getOption("gateway_environment");
     Stripe::setApiKey(pmpro_getOption("stripe_secretkey"));
     return $this->gateway;
 }
开发者ID:Seravo,项目名称:wp-paid-subscriptions,代码行数:7,代码来源:class.pmprogateway_stripe.php


示例2: pmpro_checkLevelForBraintreeCompatibility

function pmpro_checkLevelForBraintreeCompatibility($level = NULL)
{
    $gateway = pmpro_getOption("gateway");
    if ($gateway == "braintree") {
        global $wpdb;
        //check ALL the levels
        if (empty($level)) {
            $sqlQuery = "SELECT * FROM {$wpdb->pmpro_membership_levels} ORDER BY id ASC";
            $levels = $wpdb->get_results($sqlQuery, OBJECT);
            if (!empty($levels)) {
                foreach ($levels as $level) {
                    /*
                    	Braintree currently does not support:
                    	* Trial Amounts > 0.
                    	* Daily or Weekly billing periods.												
                    */
                    if ($level->trial_amount > 0 || $level->cycle_number > 0 && ($level->cycle_period == "Day" || $level->cycle_period == "Week")) {
                        return false;
                    }
                }
            }
        } else {
            //need to look it up?
            if (is_numeric($level)) {
                $level = $wpdb->get_row("SELECT * FROM {$wpdb->pmpro_membership_levels} WHERE id = '" . $wpdb->escape($level) . "' LIMIT 1");
            }
            //check this level
            if ($level->trial_amount > 0 || $level->cycle_number > 0 && ($level->cycle_period == "Day" || $level->cycle_period == "Week")) {
                return false;
            }
        }
    }
    return true;
}
开发者ID:Willislahav,项目名称:paid-memberships-pro,代码行数:34,代码来源:functions.php


示例3: sendToPayFast

 function sendToPayFast(&$order)
 {
     global $pmpro_currency;
     //taxes on initial amount
     $initial_payment = $order->InitialPayment;
     $initial_payment_tax = $order->getTaxForPrice($initial_payment);
     $initial_payment = round((double) $initial_payment + (double) $initial_payment_tax, 2);
     //taxes on the amount
     $amount = $order->PaymentAmount;
     $amount_tax = $order->getTaxForPrice($amount);
     $order->subtotal = $amount;
     $amount = round((double) $amount + (double) $amount_tax, 2);
     //build PayFast Redirect
     $environment = pmpro_getOption("gateway_environment");
     if ("sandbox" === $environment || "beta-sandbox" === $environment) {
         $merchant_id = self::SANDBOX_MERCHANT_ID;
         $merchant_key = self::SANDBOX_MERCHANT_KEY;
         $payfast_url = "https://sandbox.payfast.co.za/eng/process";
     } else {
         $merchant_id = pmpro_getOption("payfast_merchant_id");
         $merchant_key = pmpro_getOption("payfast_merchant_key");
         $payfast_url = "https://www.payfast.co.za/eng/process";
     }
     $data = array('merchant_id' => $merchant_id, 'merchant_key' => $merchant_key, 'return_url' => pmpro_url("confirmation", "?level=" . $order->membership_level->id), 'cancel_url' => '', 'notify_url' => admin_url("admin-ajax.php") . "?action=payfast_itn_handler", 'name_first' => $order->FirstName, 'name_last' => $order->LastName, 'email_address' => $order->Email, 'm_payment_id' => $order->code, 'amount' => number_format($initial_payment, 2), 'item_name' => substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127));
     $pfOutput = "";
     foreach ($data as $key => $val) {
         $pfOutput .= $key . '=' . urlencode(trim($val)) . '&';
     }
     // Remove last ampersand
     $pfOutput = substr($pfOutput, 0, -1);
     $signature = md5($pfOutput);
     $payfast_url .= '?' . $pfOutput . '&signature=' . $signature;
     wp_redirect($payfast_url);
     exit;
 }
开发者ID:Tanya-atsocial,项目名称:paid-memberships-pro,代码行数:35,代码来源:class.pmprogateway_payfast.php


示例4: pmpro_wp_mail_from

function pmpro_wp_mail_from($from_email)
{
    $pmpro_from_email = pmpro_getOption("from_email");
    if ($pmpro_from_email && is_email($pmpro_from_email)) {
        return $pmpro_from_email;
    }
    return $from_email;
}
开发者ID:Willislahav,项目名称:paid-memberships-pro,代码行数:8,代码来源:email.php


示例5: pmpro_wp_signup_location

function pmpro_wp_signup_location($location)
{
    if (is_multisite() && pmpro_getOption("redirecttosubscription")) {
        return pmpro_url("levels");
    } else {
        return $location;
    }
}
开发者ID:Tanya-atsocial,项目名称:paid-memberships-pro,代码行数:8,代码来源:login.php


示例6: pmpro_footer_link

function pmpro_footer_link()
{
    if (!pmpro_getOption("hide_footer_link")) {
        ?>
		<!-- <?php 
        echo pmpro_link();
        ?>
 -->
		<?php 
    }
}
开发者ID:Willislahav,项目名称:paid-memberships-pro,代码行数:11,代码来源:notifications.php


示例7: my_template_redirect

function my_template_redirect()
{
    global $current_user;
    $okay_pages = array('oops', 'login', 'lostpassword', 'resetpass', 'logout', pmpro_getOption('billing_page_id'), pmpro_getOption('account_page_id'), pmpro_getOption('levels_page_id'), pmpro_getOption('checkout_page_id'), pmpro_getOption('confirmation_page_id'));
    //if the user doesn't have a membership, send them home
    if (!$current_user->ID && !is_page($okay_pages) && !strpos($_SERVER['REQUEST_URI'], "login")) {
        wp_redirect(home_url("wp-login.php?redirect_to=" . urlencode($_SERVER['REQUEST_URI'])));
    } elseif (is_page() && !is_page($okay_pages) && !$current_user->membership_level->ID) {
        //change this to wp_redirect(pmpro_url("levels")); to redirect to the levels page.
        wp_redirect(wp_login_url());
    }
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:12,代码来源:functions.php


示例8: PMProGateway_braintree

 function PMProGateway_braintree($gateway = NULL)
 {
     $this->gateway = $gateway;
     $this->gateway_environment = pmpro_getOption("gateway_environment");
     //convert to braintree nomenclature
     $environment = $this->gateway_environment;
     if ($environment == "live") {
         $environment = "production";
     }
     Braintree_Configuration::environment($environment);
     Braintree_Configuration::merchantId(pmpro_getOption("braintree_merchantid"));
     Braintree_Configuration::publicKey(pmpro_getOption("braintree_publickey"));
     Braintree_Configuration::privateKey(pmpro_getOption("braintree_privatekey"));
     return $this->gateway;
 }
开发者ID:Seravo,项目名称:wp-paid-subscriptions,代码行数:15,代码来源:class.pmprogateway_braintree.php


示例9: pmpro_upgrade_1_4_2

function pmpro_upgrade_1_4_2()
{
    /*
    	Setting the new use_ssl setting.
    	PayPal Website Payments Pro, Authorize.net, and Stripe will default to use ssl.
    	PayPal Express and the test gateway (no gateway) will default to not use ssl.
    */
    $gateway = pmpro_getOption("gateway");
    if ($gateway == "paypal" || $gateway == "authorizenet" || $gateway == "stripe") {
        pmpro_setOption("use_ssl", 1);
    } else {
        pmpro_setOption("use_ssl", 0);
    }
    pmpro_setOption("db_version", "1.42");
    return 1.42;
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:16,代码来源:upgrade_1_4_2.php


示例10: pmproeewe_extra_emails

function pmproeewe_extra_emails()
{
    global $wpdb;
    //make sure we only run once a day
    $today = date("Y-m-d 00:00:00");
    /*
    	Here is where you set how many emails you want to send, how early, and which template files to e-mail.
    	If you set the template file to an empty string '' then it will send the default PMPro expiring e-mail.
    	Place your email templates in a subfolder of your active theme. Create a paid-memberships-pro folder in your theme folder,
    	and then create an email folder within that. Your template files should have a suffix of .html, but you don't put it below. So if you
    	create a file in there called myexpirationemail.html, then you'd just put 'myexpirationemail' in the array below.
    	(PMPro will fill in the .html for you.)
    */
    $emails = array(30 => 'mem_expiring_30days', 60 => 'mem_expiring_60days', 90 => 'mem_expiring_90days');
    //<--- !!! UPDATE THIS ARRAY TO CHANGE WHEN EMAILS GO OUT AND THEIR TEMPLATE FILES !!! -->
    ksort($emails, SORT_NUMERIC);
    //array to store ids of folks we sent emails to so we don't email them twice
    $sent_emails = array();
    foreach (array_keys($emails) as $days) {
        //look for memberships that are going to expire within one week (but we haven't emailed them within a week)
        $sqlQuery = "SELECT mu.user_id, mu.membership_id, mu.startdate, mu.enddate FROM {$wpdb->pmpro_memberships_users} mu LEFT JOIN {$wpdb->usermeta} um ON um.user_id = mu.user_id AND um.meta_key = 'pmpro_expiration_notice_" . $days . "' WHERE mu.status = 'active' AND mu.enddate IS NOT NULL AND mu.enddate <> '' AND mu.enddate <> '0000-00-00 00:00:00' AND DATE_SUB(mu.enddate, INTERVAL " . $days . " Day) <= '" . $today . "' AND (um.meta_value IS NULL OR DATE_ADD(um.meta_value, INTERVAL " . $days . " Day) <= '" . $today . "') ORDER BY mu.enddate";
        $expiring_soon = $wpdb->get_results($sqlQuery);
        foreach ($expiring_soon as $e) {
            if (!in_array($e->user_id, $sent_emails)) {
                //send an email
                $pmproemail = new PMProEmail();
                $euser = get_userdata($e->user_id);
                if ($euser) {
                    $euser->membership_level = pmpro_getMembershipLevelForUser($euser->ID);
                    $pmproemail->email = $euser->user_email;
                    $pmproemail->subject = sprintf(__("Your membership at %s will end soon", "pmpro"), get_option("blogname"));
                    if (strlen($emails[$days]) > 0) {
                        $pmproemail->template = $emails[$days];
                    } else {
                        $pmproemail->template = "membership_expiring";
                    }
                    $pmproemail->data = array("subject" => $pmproemail->subject, "name" => $euser->display_name, "user_login" => $euser->user_login, "sitename" => get_option("blogname"), "membership_id" => $euser->membership_level->id, "membership_level_name" => $euser->membership_level->name, "siteemail" => pmpro_getOption("from_email"), "login_link" => wp_login_url(), "enddate" => date(get_option('date_format'), $euser->membership_level->enddate), "display_name" => $euser->display_name, "user_email" => $euser->user_email);
                    $pmproemail->sendEmail();
                    printf(__("Membership expiring email sent to %s. ", "pmpro"), $euser->user_email);
                    $sent_emails[] = $e->user_id;
                }
            }
            //update user meta so we don't email them again
            update_user_meta($e->user_id, "pmpro_expiration_notice_" . $days, $today);
        }
    }
}
开发者ID:greathmaster,项目名称:pmpro-extra-expiration-warning-emails,代码行数:47,代码来源:pmpro-extra-expiration-warning-emails.php


示例11: pmpro_init_recaptcha

function pmpro_init_recaptcha()
{
    //don't load in admin
    if (is_admin()) {
        return;
    }
    //use recaptcha?
    global $recaptcha;
    $recaptcha = pmpro_getOption("recaptcha");
    if ($recaptcha) {
        global $recaptcha_publickey, $recaptcha_privatekey;
        require_once PMPRO_DIR . "/includes/lib/recaptchalib.php";
        function pmpro_recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
        {
            $locale = get_locale();
            if (!empty($locale)) {
                $parts = explode("_", $locale);
                $lang = $parts[0];
            } else {
                $lang = "en";
            }
            //filter
            $lang = apply_filters('pmpro_recaptcha_lang', $lang);
            ?>
			<div class="g-recaptcha" data-sitekey="<?php 
            echo $pubkey;
            ?>
"></div>
			<script type="text/javascript"
				src="https://www.google.com/recaptcha/api.js?hl=<?php 
            echo $lang;
            ?>
">
			</script>
			<?php 
        }
        //for templates using the old recaptcha_get_html
        if (!function_exists('recaptcha_get_html')) {
            function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
            {
                return pmpro_recaptcha_get_html($pubkey, $error, $use_ssl);
            }
        }
        $recaptcha_publickey = pmpro_getOption("recaptcha_publickey");
        $recaptcha_privatekey = pmpro_getOption("recaptcha_privatekey");
    }
}
开发者ID:AmpleTech,项目名称:paid-memberships-pro,代码行数:47,代码来源:recaptcha.php


示例12: pmpro_wp_mail_from

function pmpro_wp_mail_from($from_email)
{
    // default from email wordpress@sitename
    $sitename = strtolower($_SERVER['SERVER_NAME']);
    if (substr($sitename, 0, 4) == 'www.') {
        $sitename = substr($sitename, 4);
    }
    $default_from_email = 'wordpress@' . $sitename;
    //make sure it's the default email address
    if ($from_email == $default_from_email) {
        $pmpro_from_email = pmpro_getOption("from_email");
        if ($pmpro_from_email && is_email($pmpro_from_email)) {
            $from_email = $pmpro_from_email;
        }
    }
    return $from_email;
}
开发者ID:Tanya-atsocial,项目名称:paid-memberships-pro,代码行数:17,代码来源:email.php


示例13: pmpro_init_recaptcha

function pmpro_init_recaptcha()
{
    //don't load in admin
    if (is_admin()) {
        return;
    }
    //use recaptcha?
    global $recaptcha;
    $recaptcha = pmpro_getOption("recaptcha");
    if ($recaptcha) {
        global $recaptcha_publickey, $recaptcha_privatekey;
        if (!function_exists("recaptcha_get_html")) {
            require_once PMPRO_DIR . "/includes/lib/recaptchalib.php";
        }
        $recaptcha_publickey = pmpro_getOption("recaptcha_publickey");
        $recaptcha_privatekey = pmpro_getOption("recaptcha_privatekey");
    }
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:18,代码来源:recaptcha.php


示例14: init

 /**
  * Run on WP init
  *
  * @since 1.8
  */
 static function init()
 {
     //make sure payza is a gateway option
     add_filter('pmpro_gateways', array('PMProGateway_payza', 'pmpro_gateways'));
     //add fields to payment settings
     add_filter('pmpro_payment_options', array('PMProGateway_payza', 'pmpro_payment_options'));
     add_filter('pmpro_payment_option_fields', array('PMProGateway_payza', 'pmpro_payment_option_fields'), 10, 2);
     //add some fields to edit user page (Updates)
     add_action('pmpro_after_membership_level_profile_fields', array('PMProGateway_payza', 'user_profile_fields'));
     add_action('profile_update', array('PMProGateway_payza', 'user_profile_fields_save'));
     //updates cron
     add_action('pmpro_activation', array('PMProGateway_payza', 'pmpro_activation'));
     add_action('pmpro_deactivation', array('PMProGateway_payza', 'pmpro_deactivation'));
     add_action('pmpro_cron_example_subscription_updates', array('PMProGateway_payza', 'pmpro_cron_example_subscription_updates'));
     //code to add at checkout if payza is the current gateway
     $gateway = pmpro_getOption("gateway");
     if ($gateway == "payza") {
         add_action('pmpro_checkout_preheader', array('PMProGateway_payza', 'pmpro_checkout_preheader'));
         add_filter('pmpro_checkout_order', array('PMProGateway_payza', 'pmpro_checkout_order'));
         add_filter('pmpro_include_billing_address_fields', array('PMProGateway_payza', 'pmpro_include_billing_address_fields'));
         add_filter('pmpro_include_cardtype_field', array('PMProGateway_payza', 'pmpro_include_billing_address_fields'));
         add_filter('pmpro_include_payment_information_fields', array('PMProGateway_payza', 'pmpro_include_payment_information_fields'));
     }
 }
开发者ID:SpookBookNet,项目名称:pmpro-payza-gateway,代码行数:29,代码来源:class.pmprogateway_payza.php


示例15: printf

			<thead>
				<tr>
					<th colspan="2"><span class="pmpro_thead-msg"><?php 
        printf(__('We accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span><?php 
        _e('Credit Card Information', 'pmpro');
        ?>
</th>
				</tr>
			</thead>
			<tbody>                    
				<tr valign="top">		
					<td>	
						<?php 
        $sslseal = pmpro_getOption("sslseal");
        if ($sslseal) {
            ?>
								<div class="pmpro_sslseal"><?php 
            echo stripslashes($sslseal);
            ?>
</div>
							<?php 
        }
        ?>
						<?php 
        if (empty($pmpro_stripe_lite) || $gateway != "stripe") {
            ?>
						<div>				
							<label for="CardType"><?php 
            _e('Card Type', 'pmpro');
开发者ID:6226,项目名称:wp,代码行数:31,代码来源:billing.php


示例16: pmpro_getOption

        ?>
					</td>
				</tr>
				</tbody>
			</table>

			<?php 
        if ($gateway == "braintree") {
            ?>
				<input type='hidden' data-encrypted-name='expiration_date' id='credit_card_exp'/>
				<input type='hidden' name='AccountNumber' id='BraintreeAccountNumber'/>
				<script type="text/javascript" src="https://js.braintreegateway.com/v1/braintree.js"></script>
				<script type="text/javascript">
					//setup braintree encryption
					var braintree = Braintree.create('<?php 
            echo pmpro_getOption("braintree_encryptionkey");
            ?>
');
					braintree.onSubmitEncryptForm('pmpro_form');

					//pass expiration dates in original format
					function pmpro_updateBraintreeCardExp() {
						jQuery('#credit_card_exp').val(jQuery('#ExpirationMonth').val() + "/" + jQuery('#ExpirationYear').val());
					}
					jQuery('#ExpirationMonth, #ExpirationYear').change(function () {
						pmpro_updateBraintreeCardExp();
					});
					pmpro_updateBraintreeCardExp();

					//pass last 4 of credit card
					function pmpro_updateBraintreeAccountNumber() {
开发者ID:inetbiz,项目名称:wordpress-lms,代码行数:31,代码来源:billing.php


示例17: pmpro_getGateway

function pmpro_getGateway()
{
    //grab from param or options
    if (!empty($_REQUEST['gateway'])) {
        $gateway = $_REQUEST['gateway'];
    } elseif (!empty($_REQUEST['review'])) {
        $gateway = "paypalexpress";
    } else {
        $gateway = pmpro_getOption("gateway");
    }
    //get from options
    //set valid gateways - the active gateway in the settings and any gateway added through the filter will be allowed
    if (pmpro_getOption("gateway", true) == "paypal") {
        $valid_gateways = apply_filters("pmpro_valid_gateways", array("paypal", "paypalexpress"));
    } else {
        $valid_gateways = apply_filters("pmpro_valid_gateways", array(pmpro_getOption("gateway", true)));
    }
    //make sure it's valid
    if (!in_array($gateway, $valid_gateways)) {
        $gateway = false;
    }
    //filter for good measure
    $gateway = apply_filters('pmpro_get_gateway', $gateway, $valid_gateways);
    return $gateway;
}
开发者ID:AmpleTech,项目名称:paid-memberships-pro,代码行数:25,代码来源:functions.php


示例18: saveOrder

 /**
  * Save/update the values of the order in the database.
  */
 function saveOrder()
 {
     global $current_user, $wpdb;
     //get a random code to use for the public ID
     if (empty($this->code)) {
         $this->code = $this->getRandomCode();
     }
     //figure out how much we charged
     if (!empty($this->InitialPayment)) {
         $amount = $this->InitialPayment;
     } elseif (!empty($this->subtotal)) {
         $amount = $this->subtotal;
     } else {
         $amount = 0;
     }
     //Todo: Tax?!, Coupons, Certificates, affiliates
     if (empty($this->subtotal)) {
         $this->subtotal = $amount;
     }
     if (isset($this->tax)) {
         $tax = $this->tax;
     } else {
         $tax = $this->getTax(true);
     }
     $this->certificate_id = "";
     $this->certificateamount = "";
     //calculate total
     if (!empty($this->total)) {
         $total = $this->total;
     } else {
         $total = (double) $amount + (double) $tax;
     }
     //these fix some warnings/notices
     if (empty($this->billing)) {
         $this->billing = new stdClass();
         $this->billing->name = $this->billing->street = $this->billing->city = $this->billing->state = $this->billing->zip = $this->billing->country = $this->billing->phone = "";
     }
     if (empty($this->user_id)) {
         $this->user_id = 0;
     }
     if (empty($this->paypal_token)) {
         $this->paypal_token = "";
     }
     if (empty($this->couponamount)) {
         $this->couponamount = "";
     }
     if (empty($this->payment_type)) {
         $this->payment_type = "";
     }
     if (empty($this->payment_transaction_id)) {
         $this->payment_transaction_id = "";
     }
     if (empty($this->subscription_transaction_id)) {
         $this->subscription_transaction_id = "";
     }
     if (empty($this->affiliate_id)) {
         $this->affiliate_id = "";
     }
     if (empty($this->affiliate_subid)) {
         $this->affiliate_subid = "";
     }
     if (empty($this->session_id)) {
         $this->session_id = "";
     }
     if (empty($this->accountnumber)) {
         $this->accountnumber = "";
     }
     if (empty($this->cardtype)) {
         $this->cardtype = "";
     }
     if (empty($this->ExpirationDate)) {
         $this->ExpirationDate = "";
     }
     if (empty($this->status)) {
         $this->status = "";
     }
     if (empty($this->gateway)) {
         $this->gateway = pmpro_getOption("gateway");
     }
     if (empty($this->gateway_environment)) {
         $this->gateway_environment = pmpro_getOption("gateway_environment");
     }
     if (empty($this->notes)) {
         $this->notes = "";
     }
     //build query
     if (!empty($this->id)) {
         //set up actions
         $before_action = "pmpro_update_order";
         $after_action = "pmpro_updated_order";
         //update
         $this->sqlQuery = "UPDATE {$wpdb->pmpro_membership_orders}\n\t\t\t\t\t\t\t\t\tSET `code` = '" . $this->code . "',\n\t\t\t\t\t\t\t\t\t`session_id` = '" . $this->session_id . "',\n\t\t\t\t\t\t\t\t\t`user_id` = " . intval($this->user_id) . ",\n\t\t\t\t\t\t\t\t\t`membership_id` = " . intval($this->membership_id) . ",\n\t\t\t\t\t\t\t\t\t`paypal_token` = '" . $this->paypal_token . "',\n\t\t\t\t\t\t\t\t\t`billing_name` = '" . esc_sql($this->billing->name) . "',\n\t\t\t\t\t\t\t\t\t`billing_street` = '" . esc_sql($this->billing->street) . "',\n\t\t\t\t\t\t\t\t\t`billing_city` = '" . esc_sql($this->billing->city) . "',\n\t\t\t\t\t\t\t\t\t`billing_state` = '" . esc_sql($this->billing->state) . "',\n\t\t\t\t\t\t\t\t\t`billing_zip` = '" . esc_sql($this->billing->zip) . "',\n\t\t\t\t\t\t\t\t\t`billing_country` = '" . esc_sql($this->billing->country) . "',\n\t\t\t\t\t\t\t\t\t`billing_phone` = '" . esc_sql($this->billing->phone) . "',\n\t\t\t\t\t\t\t\t\t`subtotal` = '" . $this->subtotal . "',\n\t\t\t\t\t\t\t\t\t`tax` = '" . $this->tax . "',\n\t\t\t\t\t\t\t\t\t`couponamount` = '" . $this->couponamount . "',\n\t\t\t\t\t\t\t\t\t`certificate_id` = " . intval($this->certificate_id) . ",\n\t\t\t\t\t\t\t\t\t`certificateamount` = '" . $this->certificateamount . "',\n\t\t\t\t\t\t\t\t\t`total` = '" . $this->total . "',\n\t\t\t\t\t\t\t\t\t`payment_type` = '" . $this->payment_type . "',\n\t\t\t\t\t\t\t\t\t`cardtype` = '" . $this->cardtype . "',\n\t\t\t\t\t\t\t\t\t`accountnumber` = '" . $this->accountnumber . "',\n\t\t\t\t\t\t\t\t\t`expirationmonth` = '" . $this->expirationmonth . "',\n\t\t\t\t\t\t\t\t\t`expirationyear` = '" . $this->expirationyear . "',\n\t\t\t\t\t\t\t\t\t`status` = '" . esc_sql($this->status) . "',\n\t\t\t\t\t\t\t\t\t`gateway` = '" . $this->gateway . "',\n\t\t\t\t\t\t\t\t\t`gateway_environment` = '" . $this->gateway_environment . "',\n\t\t\t\t\t\t\t\t\t`payment_transaction_id` = '" . esc_sql($this->payment_transaction_id) . "',\n\t\t\t\t\t\t\t\t\t`subscription_transaction_id` = '" . esc_sql($this->subscription_transaction_id) . "',\n\t\t\t\t\t\t\t\t\t`affiliate_id` = '" . esc_sql($this->affiliate_id) . "',\n\t\t\t\t\t\t\t\t\t`affiliate_subid` = '" . esc_sql($this->affiliate_subid) . "',\n\t\t\t\t\t\t\t\t\t`notes` = '" . esc_sql($this->notes) . "'\n\t\t\t\t\t\t\t\t\tWHERE id = '" . $this->id . "'\n\t\t\t\t\t\t\t\t\tLIMIT 1";
     } else {
         //set up actions
         $before_action = "pmpro_add_order";
         $after_action = "pmpro_added_order";
         //insert
//.........这里部分代码省略.........
开发者ID:nwmcinc,项目名称:paid-memberships-pro,代码行数:101,代码来源:class.memberorder.php


示例19: do_action

:</strong> <?php 
        echo $pmpro_invoice->discount_code->code;
        ?>
</li>
			<?php 
    }
    ?>
			<?php 
    do_action("pmpro_invoice_bullets_bottom", $pmpro_invoice);
    ?>
		</ul>
		
		<?php 
    //check instructions
    if ($pmpro_invoice->gateway == "check" && !pmpro_isLevelFree($pmpro_invoice->membership_level)) {
        echo wpautop(pmpro_getOption("instructions"));
    }
    ?>
			
		<table id="pmpro_invoice_table" class="pmpro_invoice" width="100%" cellpadding="0" cellspacing="0" border="0">
			<thead>
				<tr>
					<?php 
    if (!empty($pmpro_invoice->billing->name)) {
        ?>
						<th><?php 
        _e('Billing Address', 'pmpro');
        ?>
</th>
					<?php 
    }
开发者ID:gato-gordo,项目名称:association-print-scholars,代码行数:31,代码来源:invoice.php


示例20: esc_sql

    if (pmpro_hasMembershipLevel($level->id, $user_id)) {
        global $wpdb;
        $sqlQuery = "SELECT startdate FROM {$wpdb->pmpro_memberships_users} WHERE user_id = '" . esc_sql($user_id) . "' AND membership_id = '" . esc_sql($level->id) . "' AND status = 'active' ORDER BY id DESC LIMIT 1";
        $old_startdate = $wpdb->get_var($sqlQuery);
        if (!empty($old_startdate)) {
            $startdate = "'" . $old_startdate . "'";
        }
    }
    return $startdate;
}
add_filter("pmpro_checkout_start_date", "pmpro_checkout_start_date_keep_startdate", 10, 3);
/*
	Stripe Lite Pulled into Core Plugin
*/
//Stripe Lite, Set the Globals/etc
$stripe_billingaddress = pmpro_getOption("stripe_billingaddress");
if (empty($stripe_billingaddress)) {
    global $pmpro_stripe_lite;
    $pmpro_stripe_lite = true;
    add_filter("pmpro_stripe_lite", "__return_true");
    add_filter("pmpro_required_billing_fields", "pmpro_required_billing_fields_stripe_lite");
}
//Stripe Lite, Don't Require Billing Fields
function pmpro_required_billing_fields_stripe_lite($fields)
{
    global $gateway;
    //ignore if not using stripe
    if ($gateway != "stripe") {
        return $fields;
    }
    //some fields to remove
开发者ID:Seravo,项目名称:wp-paid-subscriptions,代码行数:31,代码来源:filters.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pmpro_hasMembershipLevel函数代码示例发布时间:2022-05-15
下一篇:
PHP pmpro_getMembershipLevelsForUser函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap