本文整理汇总了PHP中EE_Transaction::is_free方法的典型用法代码示例。如果您正苦于以下问题:PHP EE_Transaction::is_free方法的具体用法?PHP EE_Transaction::is_free怎么用?PHP EE_Transaction::is_free使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EE_Transaction
的用法示例。
在下文中一共展示了EE_Transaction::is_free方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_shortcode
/**
* process_shortcode - EES_Espresso_Thank_You
*
* @access public
* @param array $attributes
* @return string
*/
public function process_shortcode($attributes = array())
{
$this->init();
if (!$this->_current_txn instanceof EE_Transaction) {
EE_Error::add_error(__('No transaction information could be retrieved or the transaction data is not of the correct type.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
return '';
}
// link to receipt
$template_args['TXN_receipt_url'] = $this->_current_txn->receipt_url('html');
$template_args['transaction'] = $this->_current_txn;
add_action('AHEE__thank_you_page_overview_template__content', array($this, 'get_registration_details'));
if ($this->_is_primary && !$this->_current_txn->is_free()) {
add_action('AHEE__thank_you_page_overview_template__content', array($this, 'get_ajax_content'));
}
return EEH_Template::locate_template(THANK_YOU_TEMPLATES_PATH . 'thank-you-page-overview.template.php', $template_args, TRUE, TRUE);
}
示例2: process_shortcode
/**
* process_shortcode - EES_Espresso_Thank_You
*
* @access public
* @param array $attributes
* @return string
* @throws \EE_Error
*/
public function process_shortcode($attributes = array())
{
$this->init();
if (!$this->_current_txn instanceof EE_Transaction) {
return EE_Error::get_notices();
}
//EEH_Debug_Tools::log( __CLASS__, __FUNCTION__, __LINE__, array( $this->_current_txn ), true, 'EE_Transaction: ' . $this->_current_txn->ID() );
// link to receipt
$template_args['TXN_receipt_url'] = $this->_current_txn->receipt_url('html');
if (!empty($template_args['TXN_receipt_url'])) {
$template_args['order_conf_desc'] = __('%1$sCongratulations%2$sYour registration has been successfully processed.%3$sCheck your email for your registration confirmation or click the button below to view / download / print a full description of your purchases and registration information.', 'event_espresso');
} else {
$template_args['order_conf_desc'] = __('%1$sCongratulations%2$sYour registration has been successfully processed.%3$sCheck your email for your registration confirmation.', 'event_espresso');
}
$template_args['transaction'] = $this->_current_txn;
$template_args['revisit'] = EE_Registry::instance()->REQ->get('revisit', false);
add_action('AHEE__thank_you_page_overview_template__content', array($this, 'get_registration_details'));
if ($this->_is_primary && !$this->_current_txn->is_free()) {
add_action('AHEE__thank_you_page_overview_template__content', array($this, 'get_ajax_content'));
}
return EEH_Template::locate_template(THANK_YOU_TEMPLATES_PATH . 'thank-you-page-overview.template.php', $template_args, true, true);
}
示例3: payment_required
/**
* payment_required
* @return boolean
*/
public function payment_required()
{
// if NOT:
// registration via admin
// completed TXN
// overpaid TXN
// free TXN ( total = 0.00 )
// then payment required is TRUE
return !($this->admin_request || $this->transaction->is_completed() || $this->transaction->is_overpaid() || $this->transaction->is_free()) ? TRUE : FALSE;
}