本文整理汇总了PHP中EE_Error类的典型用法代码示例。如果您正苦于以下问题:PHP EE_Error类的具体用法?PHP EE_Error怎么用?PHP EE_Error使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EE_Error类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
*
* @throws EE_Error
* @return string of html to display the field
*/
function display()
{
if (!$this->_input instanceof EE_Form_Input_With_Options_Base) {
throw new EE_Error(sprintf(__("Cannot use Checkbox Display Strategy with an input that doesn't have options", "event_espresso")));
}
//d( $this->_input );
$multi = count($this->_input->options()) > 1 ? TRUE : FALSE;
$this->_input->set_label_sizes();
$label_size_class = $this->_input->get_label_size_class();
$html = '';
if (!is_array($this->_input->raw_value()) && $this->_input->raw_value() !== NULL) {
EE_Error::doing_it_wrong('EE_Checkbox_Display_Strategy::display()', sprintf(__('Input values for checkboxes should be an array of values, but the value for input "%1$s" is "%2$s". Please verify that the input name is exactly "%3$s"', 'event_espresso'), $this->_input->html_id(), var_export($this->_input->raw_value(), true), $this->_input->html_name() . '[]'), '4.8.1');
}
$input_raw_value = (array) $this->_input->raw_value();
foreach ($this->_input->options() as $value => $display_text) {
$option_value_as_string = $this->_input->get_normalization_strategy()->unnormalize_one($value);
$html_id = $multi ? $this->_input->html_id() . '-' . sanitize_key($option_value_as_string) : $this->_input->html_id();
$html .= EEH_HTML::nl(0, 'checkbox');
$html .= '<label for="' . $html_id . '" id="' . $html_id . '-lbl" class="ee-checkbox-label-after' . $label_size_class . '">';
$html .= EEH_HTML::nl(1, 'checkbox');
$html .= '<input type="checkbox"';
$html .= ' name="' . $this->_input->html_name() . '[]"';
$html .= ' id="' . $html_id . '"';
$html .= ' class="' . $this->_input->html_class() . '"';
$html .= ' style="' . $this->_input->html_style() . '"';
$html .= ' value="' . esc_attr($value) . '"';
$html .= !empty($input_raw_value) && in_array($value, $input_raw_value) ? ' checked="checked"' : '';
$html .= '> ';
$html .= $display_text;
$html .= EEH_HTML::nl(-1, 'checkbox') . '</label>';
}
return $html;
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:38,代码来源:EE_Checkbox_Display_Strategy.strategy.php
示例2: display
/**
*
* @throws EE_Error
* @return string of html to display the field
*/
public function display()
{
$input = $this->get_input();
//d( $input );
$multi = count($input->options()) > 1 ? TRUE : FALSE;
$input->set_label_sizes();
$label_size_class = $input->get_label_size_class();
$html = '';
if (!is_array($input->raw_value()) && $input->raw_value() !== NULL) {
EE_Error::doing_it_wrong('EE_Checkbox_Display_Strategy::display()', sprintf(__('Input values for checkboxes should be an array of values, but the value for input "%1$s" is "%2$s". Please verify that the input name is exactly "%3$s"', 'event_espresso'), $input->html_id(), var_export($input->raw_value(), true), $input->html_name() . '[]'), '4.8.1');
}
$input_raw_value = (array) $input->raw_value();
foreach ($input->options() as $value => $display_text) {
$value = $input->get_normalization_strategy()->unnormalize_one($value);
$html_id = $multi ? $this->get_sub_input_id($value) : $input->html_id();
$html .= EEH_HTML::nl(0, 'checkbox');
$html .= '<label for="' . $html_id . '" id="' . $html_id . '-lbl" class="ee-checkbox-label-after' . $label_size_class . '">';
$html .= EEH_HTML::nl(1, 'checkbox');
$html .= '<input type="checkbox"';
$html .= ' name="' . $input->html_name() . '[]"';
$html .= ' id="' . $html_id . '"';
$html .= ' class="' . $input->html_class() . '"';
$html .= ' style="' . $input->html_style() . '"';
$html .= ' value="' . esc_attr($value) . '"';
$html .= !empty($input_raw_value) && in_array($value, $input_raw_value) ? ' checked="checked"' : '';
$html .= ' ' . $this->_input->other_html_attributes();
$html .= '> ';
$html .= $display_text;
$html .= EEH_HTML::nl(-1, 'checkbox') . '</label>';
}
return $html;
}
示例3: register
/**
* Method for registering new EE_PMT_Base children
*
* @since 4.5.0
* @param string $payment_method_id a unique identifier for this set of modules Required.
* @param array $setup_args an array of arguments provided for registering modules Required.{
* @type string[] $payment_method_paths each element is the folder containing the EE_PMT_Base child class
* (eg, 'public_html/wp-content/plugins/my_plugin/Payomatic/' which contains the files
* EE_PMT_Payomatic.pm.php)
* }
* @throws EE_Error
* @internal param string payment_method_paths an array of full server paths to folders containing any EE_PMT_Base children, or to the EED_Module files themselves
* @return void
*/
public static function register($payment_method_id = NULL, $setup_args = array())
{
//required fields MUST be present, so let's make sure they are.
if (empty($payment_method_id) || !is_array($setup_args) || empty($setup_args['payment_method_paths'])) {
throw new EE_Error(__('In order to register Payment Methods with EE_Register_Payment_Method::register(), you must include a "payment_method_id" (a unique identifier for this set of modules), and an array containing the following keys: "payment_method_paths" (an array of full server paths to folders that contain modules, or to the module files themselves)', 'event_espresso'));
}
//make sure we don't register twice
if (isset(self::$_settings[$payment_method_id])) {
return;
}
//make sure this was called in the right place!
if (!did_action('AHEE__EE_System__load_espresso_addons') || did_action('AHEE__EE_System__register_shortcodes_modules_and_widgets')) {
EE_Error::doing_it_wrong(__METHOD__, __('An attempt to register modules has failed because it was not registered at the correct time. Please use the "AHEE__EE_System__register_shortcodes_modules_and_widgets" hook to register modules.', 'event_espresso'), '4.3.0');
}
//setup $_settings array from incoming values.
self::$_settings[$payment_method_id] = array('payment_method_paths' => isset($setup_args['payment_method_paths']) ? (array) $setup_args['payment_method_paths'] : array());
// add to list of modules to be registered
add_filter('FHEE__EE_Payment_Method_Manager__register_payment_methods__payment_methods_to_register', array('EE_Register_Payment_Method', 'add_payment_methods'));
/**
* If EE_Payment_Method_Manager::register_payment_methods has already been called, we need it to be called again
* (because it's missing the paymetn method we JUST registered here). We are assuming EE_Register_payment_method::register()
* will be called only once per payment method from an addon, so going with that assumption we should always do this.
* If that assumption is false, we should verify this newly-registered paymetn method isn't on the EE_Payment_Method_Manager::_payment_method_types array before calling this (this code should be changed to improve performance)
*/
if (did_action('FHEE__EE_Payment_Method_Manager__register_payment_methods__registered_payment_methods')) {
EE_Registry::instance()->load_lib('Payment_Method_Manager');
EE_Payment_Method_Manager::instance()->maybe_register_payment_methods(TRUE);
}
}
示例4: register
/**
* Used to register capability items with EE core.
*
* @since 4.5.0
*
* @param string $cap_reference usually will be a class name that references capability related items setup for something.
* @param array $setup_args {
* An array of items related to registering capabilities.
* @type array $capabilities An array mapping capability strings to core WP Role. Something like array( 'administrator' => array( 'read_cap', 'edit_cap', 'delete_cap'), 'author' => array( 'read_cap' ) ).
* @type array $capability_maps EE_Meta_Capability_Map[] @see EE_Capabilities.php for php docs on these objects. Should be indexed by the classname for the capability map and values representing the arguments for the map.
* }
* @throws EE_Error
* @return void
*/
public static function register($cap_reference = NULL, $setup_args = array())
{
//required fields MUST be present, so let's make sure they are.
if (!isset($cap_reference) || !is_array($setup_args) || empty($setup_args['capabilities'])) {
throw new EE_Error(__('In order to register capabilities with EE_Register_Capabilities::register, you must include a unique name to reference the capabilities being registered, plus an array containing the following keys: "capabilities".', 'event_espresso'));
}
//make sure we don't register twice
if (isset(self::$_registry[$cap_reference])) {
return;
}
//make sure this is not registered too late or too early.
if (!did_action('AHEE__EE_System__load_espresso_addons') || did_action('AHEE__EE_System___detect_if_activation_or_upgrade__begin')) {
EE_Error::doing_it_wrong(__METHOD__, sprintf(__('%s has been registered too late. Please ensure that EE_Register_Capabilities::register has been called at some point before the "AHEE__EE_System___detect_if_activation_or_upgrade__begin" action hook has been called.', 'event_espresso'), $cap_reference), '4.5.0');
}
//some preliminary sanitization and setting to the $_registry property
self::$_registry[$cap_reference] = array('caps' => isset($setup_args['capabilities']) && is_array($setup_args['capabilities']) ? $setup_args['capabilities'] : array(), 'cap_maps' => isset($setup_args['capability_maps']) ? $setup_args['capability_maps'] : array());
//set initial caps (note that EE_Capabilities takes care of making sure that the caps get added donly once)
add_filter('FHEE__EE_Capabilities__init_caps_map__caps', array('EE_Register_Capabilities', 'register_capabilities'), 10);
//add filter for cap maps
add_filter('FHEE__EE_Capabilities___set_meta_caps__meta_caps', array('EE_Register_Capabilities', 'register_cap_maps'), 10);
//init_role_caps to register new capabilities
if (is_admin()) {
EE_Registry::instance()->load('Capabilities');
EE_Capabilities::instance()->init_caps();
}
}
示例5: _migration_step
function _migration_step($num_items = 50)
{
//get teh calendar's config
if (isset(EE_Config::instance()->addons->EE_Calendar) && EE_Config::instance()->addons->EE_Calendar instanceof EE_Calendar_Config) {
$c = EE_Config::instance()->addons->EE_Calendar;
} else {
$c = new EE_Calendar_Config();
EE_Config::instance()->addons->EE_Calendar = $c;
}
$items_actually_migrated = 0;
$old_org_options = get_option('espresso_calendar_options');
//the option's name differened depending on the version of the calendar
if (!$old_org_options) {
$old_org_options = get_option('espresso_calendar_settings');
}
foreach ($this->_org_options_we_know_how_to_migrate as $option_name) {
//only bother migrating if there's a setting to migrate. Otherwise we'll just use the default
if (isset($old_org_options[$option_name])) {
$this->_handle_org_option($option_name, $old_org_options[$option_name], $c);
}
$items_actually_migrated++;
}
// d($c);
$success = EE_Config::instance()->update_config('addons', 'EE_Calendar', $c);
if (!$success) {
$this->add_error(EE_Error::get_notices());
}
// d($success);
// d($c);
// die;
if ($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()) {
$this->set_completed();
}
return $items_actually_migrated;
}
示例6: _migration_step
/**
* _migration_step
*
* @access protected
* @param int $num_items
* @throws EE_Error
* @return int number of items ACTUALLY migrated
*/
protected function _migration_step($num_items = 1)
{
// if this isn't set then something is really wrong
if (!EE_Config::instance()->core instanceof EE_Core_Config) {
throw new EE_Error(__('It appears the Event Espresso Core Configuration is not setup correctly.', 'event_espresso'));
}
// name of the WP Posts Page
$posts_page = $this->_get_page_for_posts();
// make sure critical pages get removed
$this->_update_post_shortcodes($posts_page);
// save updated config, but don't add errors
if (!EE_Config::instance()->update_espresso_config(FALSE, FALSE)) {
EE_Error::add_error(__('The Event Espresso Configuration Settings were not updated when attempting to save the "critical page post shortcodes".', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
}
// check for errors
$notices = EE_Error::get_notices(FALSE);
// any errors to report?
if (isset($notices['errors'])) {
foreach ($notices as $value) {
$this->add_error($value);
}
}
//regardless of whether it worked or not, we ought to continue the migration
$this->set_completed();
return 1;
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:34,代码来源:EE_DMS_4_3_0_critical_page_shortcode_tracking.dmsstage.php
示例7: register
/**
* Helper method for registring a new shortcodes library class for the messages system.
*
* Note this is not used for adding shortcodes to existing libraries. It's for registering anything
* related to registering a new EE_{shortcode_library_name}_Shortcodes.lib.php class.
*
* @since 4.3.0
*
* @param array $setup_args {
* An array of arguments provided for registering the new messages shortcode library.
*
* @type string $name What is the name of this shortcode library
* (e.g. 'question_list');
* @type array $autoloadpaths An array of paths to add to the messages
* autoloader for the new shortcode library
* class file.
* @type string $msgr_validator_callback Callback for a method that will register the
* library with the messenger
* _validator_config. Optional.
* @type string $msgr_template_fields_callback Callback for changing adding the
* _template_fields property for messenger.
* For example, the shortcode library may add
* a new field to the message templates.
* Optional.
* @type string $valid_shortcodes_callback Callback for message types
* _valid_shortcodes array setup. Optional.
* @type array $list_type_shortcodes If there are any specific shortcodes with this
* message shortcode library that should be
* considered "list type" then include them in an
* array. List Type shortcodes are shortcodes that
* have a corresponding field that indicates how
* they are parsed. Optional.
* }
* @return void
*/
public static function register($name = NULL, $setup_args = array())
{
//required fields MUST be present, so let's make sure they are.
if (empty($name) || !is_array($setup_args) || empty($setup_args['autoloadpaths'])) {
throw new EE_Error(__('In order to register a messages shortcode library with EE_Register_Messages_Shortcode_Library::register, you must include a "name" (a unique identifier for this set of message shortcodes), and an array containing the following keys: : "autoload_paths"', 'event_espresso'));
}
//make sure this was called in the right place!
if (!did_action('EE_Brewing_Regular___messages_caf') || did_action('AHEE__EE_System__perform_activations_upgrades_and_migrations')) {
EE_Error::doing_it_wrong(__METHOD__, sprintf(__('Should be only called on the "EE_Brewing_Regular___messages_caf" hook (Trying to register a library named %s).', 'event_espresso'), $name), '4.3.0');
}
$name = (string) $name;
self::$_ee_messages_shortcode_registry[$name] = array('autoloadpaths' => (array) $setup_args['autoloadpaths'], 'list_type_shortcodes' => !empty($setup_args['list_type_shortcodes']) ? (array) $setup_args['list_type_shortcodes'] : array());
//add filters
add_filter('FHEE__EE_Messages_Init__autoload_messages__dir_ref', array('EE_Register_Messages_Shortcode_Library', 'register_msgs_autoload_paths'), 10);
//add below filters if the required callback is provided.
if (!empty($setup_args['msgr_validator_callback'])) {
add_filter('FHEE__EE_messenger__get_validator_config', $setup_args['msgr_validator_callback'], 10, 2);
}
if (!empty($setup_args['msgr_template_fields_callback'])) {
add_filter('FHEE__EE_messenger__get_template_fields', $setup_args['msgr_template_fields_callback'], 10, 2);
}
if (!empty($setup_args['valid_shortcodes_callback'])) {
add_filter('FHEE__EE_Messages_Base__get_valid_shortcodes', $setup_args['valid_shortcodes_callback'], 10, 2);
}
if (!empty($setup_args['list_type_shortcodes'])) {
add_filter('FHEE__EEH_Parse_Shortcodes___parse_message_template__list_type_shortcodes', array('EE_Register_Messages_Shortcode_Library', 'register_list_type_shortcodes'), 10);
}
}
示例8: register
/**
* register method for setting up model extensions
*
* @param string $model_id unique id for the extensions being setup
* @param array $config {
* @throws EE_Error
* @type array $ model_extension_paths array of folders containing DB model extensions, where each file follows the models naming convention, which is: EEME_{your_plugin_slug}_model_name_extended}.model_ext.php. Where your_plugin_slug} is really anything you want (but something having to do with your addon, like 'Calendar' or '3D_View') and model_name_extended} is the model extended. The class contained in teh file should extend EEME_Base_{model_name_extended}.model_ext.php. Where {your_plugin_slug} is really anything you want (but something having to do with your addon, like 'Calendar' or '3D_View') and {model_name_extended} is the model extended. The class contained in teh file should extend EEME_Base
* @type array $ class_extension_paths array of folders containing DB class extensions, where each file follows the model class extension naming convention, which is: EEE_{your_plugin_slug}_model_name_extended}.class_ext.php. Where your_plugin_slug} is something like 'Calendar','MailChimp',etc, and model_name_extended} is the name of the model extended, eg 'Attendee','Event',etc. The class contained in the file should extend EEE_Base_Class._{model_name_extended}.class_ext.php. Where {your_plugin_slug} is something like 'Calendar','MailChimp',etc, and {model_name_extended} is the name of the model extended, eg 'Attendee','Event',etc. The class contained in the file should extend EEE_Base_Class.
* }
*
* @return void
*/
public static function register($model_id = NULL, $config = array())
{
//required fields MUST be present, so let's make sure they are.
if (empty($model_id) || !is_array($config) || empty($config['model_extension_paths']) && empty($config['class_extension_paths'])) {
throw new EE_Error(__('In order to register Model extensions with EE_Register_Model_Extensions::register(), you must include a "model_id" (a unique identifier for this set of models), and an array containing the following keys: "model_extension_paths" (an array of full server paths to folders that contain model extensions), and "class_extension_paths" (an array of full server paths to folders that contain class extensions)', 'event_espresso'));
}
//check correct loading
if (!did_action('AHEE__EE_System__load_espresso_addons') || did_action('AHEE__EE_Admin__loaded')) {
EE_Error::doing_it_wrong(__METHOD__, sprintf(__('An attempt was made to register "%s" as a group models has failed because it was not registered at the correct time. Please use the "AHEE__EE_System__load_espresso_addons" hook to register models.', 'event_espresso'), $model_id), '4.3');
}
self::$_registry[$model_id] = $config;
EE_Registry::instance()->load_helper('File');
if (isset($config['model_extension_paths'])) {
require_once EE_LIBRARIES . 'plugin_api/db/EEME_Base.lib.php';
$class_to_filepath_map = EEH_File::get_contents_of_folders($config['model_extension_paths']);
EEH_Autoloader::register_autoloader($class_to_filepath_map);
foreach (array_keys($class_to_filepath_map) as $classname) {
new $classname();
}
unset($config['model_extension_paths']);
}
if (isset($config['class_extension_paths'])) {
require_once EE_LIBRARIES . 'plugin_api/db/EEE_Base_Class.lib.php';
$class_to_filepath_map = EEH_File::get_contents_of_folders($config['class_extension_paths']);
EEH_Autoloader::register_autoloader($class_to_filepath_map);
foreach (array_keys($class_to_filepath_map) as $classname) {
new $classname();
}
unset($config['class_extension_paths']);
}
foreach ($config as $unknown_key => $unknown_config) {
throw new EE_Error(sprintf(__("The key '%s' is not a known key for registering a model", "event_espresso"), $unknown_key));
}
}
示例9: get_default_value
/**
* Gets the default which is always the current user. This can't be set when initially
* constructing the model field because that's done before $current_user is set
* @return mixed
*/
function get_default_value()
{
if (did_action('init')) {
return get_current_user_id();
} else {
EE_Error::doing_it_wrong('EE_WP_User_Field::get_default_value', __('You cant get a default value for a wp_User_Field because the "init" action is called, because current_user global hasnt yet been setup. Consider doing your business logic on the "init" hook or later.', 'event_espresso'), '4.6.20');
return 1;
}
}
示例10: remove_relation_to_term_taxonomy
/**
* Removes the relation to the specified term taxonomy, and maintains the
* data integrity of the term taxonomy provided
* @param EE_Term_Taxonomy $term_taxonomy
* @return EE_Base_Class the relation was removed from
*/
function remove_relation_to_term_taxonomy($term_taxonomy)
{
if (!$term_taxonomy) {
EE_Error::add_error(sprintf(__("No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso"), get_class($this), $this->ID()), __FILE__, __FUNCTION__, __LINE__);
return NULL;
}
$term_taxonomy->set_count($term_taxonomy->count() - 1);
$term_taxonomy->save();
return $this->_remove_relation_to($term_taxonomy, 'Term_Taxonomy');
}
示例11: __construct
/**
* constructor for questions
* @param \EE_Question $QST EE_Question object
* @param \EE_Answer $ANS EE_Answer object
* @param array $q_meta
* @access public
* @return \EE_Question_Form_Input
*/
public function __construct(EE_Question $QST = NULL, EE_Answer $ANS = NULL, $q_meta = array())
{
if (empty($QST) || empty($ANS)) {
EE_Error::add_error(__('An error occurred. A valid EE_Question or EE_Answer object was not received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
return NULL;
}
$this->_QST = $QST;
$this->_ANS = $ANS;
$this->set_question_form_input_meta($q_meta);
$this->set_question_form_input_init();
}
示例12: __construct
public function __construct($url_link = 0)
{
if ($this->registration = EE_Registry::instance()->load_model('Registration')->get_registration_for_reg_url_link($url_link)) {
$this->transaction = $this->registration->transaction();
$payment_settings = EE_Config::instance()->gateway->payment_settings;
//get_user_meta(EE_Registry::instance()->CFG->wp_user, 'payment_settings', TRUE);
$this->invoice_payment_method = EEM_Payment_Method::instance()->get_one_of_type('Invoice');
} else {
EE_Error::add_error(__('Your request appears to be missing some required data, and no information for your transaction could be retrieved.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
}
}
示例13: update_debug_logging_options
/**
* update_debug_logging_options
*
* @param array $admin_options
* @return array
*/
public function update_debug_logging_options($admin_options = array())
{
$use_full_logging = isset($this->_req_data['use_full_logging']) ? (bool) absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
$admin_options->use_full_logging = $use_full_logging;
if ($use_full_logging === FALSE) {
EE_Error::get_notices(FALSE);
EE_Error::reset_notices();
}
$admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint($this->_req_data['use_remote_logging']) : $admin_options->use_remote_logging;
$admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw($this->_req_data['remote_logging_url']) : $admin_options->remote_logging_url;
return $admin_options;
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:18,代码来源:Extend_General_Settings_Admin_Page.core.php
示例14: prepare_for_set
/**
* When setting, just verify that the value being used matches what we've defined as allowable enum values.
* If not, throw an error (but if WP_DEBUG is false, just set the value to default)
* @param string $value_inputted_for_field_on_model_object
* @return string
* @throws EE_Error
*/
function prepare_for_set($value_inputted_for_field_on_model_object)
{
if ($value_inputted_for_field_on_model_object !== null && !array_key_exists($value_inputted_for_field_on_model_object, $this->_allowed_enum_values)) {
if (defined('WP_DEBUG') && WP_DEBUG) {
$msg = sprintf(__('System is assigning incompatible value "%1$s" to field "%2$s"', 'event_espresso'), $value_inputted_for_field_on_model_object, $this->_name);
$msg2 = sprintf(__('Allowed values for "%1$s" are "%2$s". You provided: "%3$s"', 'event_espresso'), $this->_name, implode(", ", array_keys($this->_allowed_enum_values)), $value_inputted_for_field_on_model_object);
EE_Error::add_error("{$msg}||{$msg2}", __FILE__, __FUNCTION__, __LINE__);
}
return $this->get_default_value();
}
return $value_inputted_for_field_on_model_object;
}
示例15: _migration_step
/**
* _migration_step
*
* @access protected
* @param int $num_items
* @throws EE_Error
* @return int number of items ACTUALLY migrated
*/
protected function _migration_step($num_items = 1)
{
$templates_relative_path = 'modules/gateways/Invoice/lib/templates/';
$overridden_invoice_body = EEH_Template::locate_template($templates_relative_path . 'invoice_body.template.php', NULL, FALSE, FALSE, TRUE);
$overridden_receipt_body = EEH_Template::locate_template($templates_relative_path . 'receipt_body.template.php', NULL, FALSE, FALSE, TRUE);
if ($overridden_invoice_body || $overridden_receipt_body) {
EE_Error::add_persistent_admin_notice('invoice_overriding_templates', sprintf(__('Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE);
}
//regardless of whether it worked or not, we ought to continue the migration
$this->set_completed();
return 1;
}