Skip to content

Commit

Permalink
Lastest cafe changes 5.0.29.p
Browse files Browse the repository at this point in the history
  • Loading branch information
Pebblo committed Oct 11, 2024
1 parent 16f63db commit d359059
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 38 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Releases

### [5.0.29]

#### Fixed
- [Clean Billing Info AFTER Passing Payment to Gateway (#1582)](https://github.com/eventespresso/cafe/pull/1582)

#### Changed
- [BuildMachine 5.0.28 changes (#1579)](https://github.com/eventespresso/cafe/pull/1579)


### [5.0.28]

#### Added
Expand All @@ -31,6 +40,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Ensure WordPress Options Are Saved (#1574)](https://github.com/eventespresso/cafe/pull/1574)






### [5.0.27]

#### Added
Expand All @@ -46,6 +59,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [auto lint fixes (#1358)](https://github.com/eventespresso/cafe/pull/1358)






### [5.0.26]


Expand All @@ -56,9 +73,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [BuildMachine changes - 5.0.25.p (#1511)](https://github.com/eventespresso/cafe/pull/1511)






### [5.0.25]



#### Changed
- [BuildMachine changes - 5.0.24.p (#1486)](https://github.com/eventespresso/cafe/pull/1486)
- [Fix and Split Up PHP Unit Tests (#1354)](https://github.com/eventespresso/cafe/pull/1354)
Expand All @@ -67,6 +89,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Remove USE_ADVANCED_EDITOR Feature Flag (Barista#1332) (#1503)](https://github.com/eventespresso/cafe/pull/1503)





### [5.0.24]

#### Added
Expand Down
26 changes: 0 additions & 26 deletions core/domain/services/cron/jobs/GarbageCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
use EventEspresso\core\domain\services\database\DbStatus;
use Exception;
use ReflectionException;
use EventEspresso\core\libraries\batch\JobHandlerBaseClasses\JobHandlerFile;
use EEH_File;

class GarbageCollection extends CronJob
{
Expand All @@ -30,10 +28,6 @@ public function setHooks(): void
'AHEE_EE_Cron_Tasks__clean_out_old_gateway_logs',
[$this, 'cleanUpOldGatewayLogs']
);
add_action(
'AHEE__EE_Cron_Tasks__clean_up_temp_directories',
[$this, 'cleanUpTempDirectories']
);
}


Expand Down Expand Up @@ -74,24 +68,4 @@ public function cleanUpOldGatewayLogs(): void
EEM_Change_Log::instance()->delete_gateway_logs_older_than(new DateTime($time_diff_for_comparison));
}
}


/**
* Deletes old gateway logs. After about a week we usually don't need them for debugging. But folks can filter that.
*
* @throws EE_Error
* @throws ReflectionException
* @throws Exception
*/
public function cleanUpTempDirectories(): void
{
if (DbStatus::isOnline()) {
$base_folder = apply_filters(
'FHEE__EventEspressoBatchRequest\JobHandlerBaseClasses\JobHandlerFile__get_base_folder',
EVENT_ESPRESSO_UPLOAD_DIR
);
$temp_batch_dir = $base_folder . JobHandlerFile::temp_folder_name;
EEH_File::delete($temp_batch_dir);
}
}
}
23 changes: 14 additions & 9 deletions core/libraries/payment_methods/EE_PMT_Base.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,15 @@ public function process_payment(
$amount = $amount ?: $transaction->remaining();
$method = EEM_Payment_Method::instance()->is_valid_scope($method) ? $method : EEM_Payment_Method::scope_cart;

// if there is billing info, clean it and save it NOW before doing anything else
if ($billing_info instanceof EE_Billing_Attendee_Info_Form) {
$this->_save_billing_info_to_attendee($billing_info, $transaction);
}

// @todo: add surcharge for the payment method, if any
if (! $this->_gateway instanceof EE_Gateway) {
// no gateway provided
// there is no payment. Must be an offline gateway
// no gateway provided, must be an offline gateway
// create a payment object anyways, but don't save it
// but if there is billing info, clean it and save it first
if ($billing_info instanceof EE_Billing_Attendee_Info_Form) {
$this->_save_billing_info_to_attendee($billing_info, $transaction);
}
return EE_Payment::new_instance(
[
'STS_ID' => EEM_Payment::status_id_pending,
Expand All @@ -397,11 +396,17 @@ public function process_payment(
$transaction
);
$previous_payment_count = $this->getPreviousPaymentCount($transaction, $amount, $method);
if ($previous_payment_count >= $max_payment_attempts) {
return $payment;
// only pass payment to gateway if we haven't exceeded the max attempts
$payment = $previous_payment_count < $max_payment_attempts
? $this->passPaymentToGateway($payment, $transaction, $billing_info, $return_url, $fail_url)
: $payment;

// if there is billing info, clean it and save it
if ($billing_info instanceof EE_Billing_Attendee_Info_Form) {
$this->_save_billing_info_to_attendee($billing_info, $transaction);
}

return $this->passPaymentToGateway($payment, $transaction, $billing_info, $return_url, $fail_url);
return $payment;
}


Expand Down
4 changes: 2 additions & 2 deletions espresso.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Event Espresso
Plugin URI: https://eventespresso.com/pricing/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link
Description: Manage events, sell tickets, and receive payments from your WordPress website. Reduce event administration time, cut-out ticketing fees, and own your customer data. | <a href="https://eventespresso.com/add-ons/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Extensions</a> | <a href="https://eventespresso.com/pricing/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Sales</a> | <a href="admin.php?page=espresso_support">Support</a>
Version: 5.0.29.rc.000
Version: 5.0.29.rc.002
Author: Event Espresso
Author URI: https://eventespresso.com/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link
License: GPLv3
Expand Down Expand Up @@ -104,7 +104,7 @@ function espresso_minimum_php_version_error()
*/
function espresso_version(): string
{
return apply_filters('FHEE__espresso__espresso_version', '5.0.29.rc.000');
return apply_filters('FHEE__espresso__espresso_version', '5.0.29.rc.002');
}

/**
Expand Down
43 changes: 42 additions & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
{"awsbucket":"","awsregion":"","decafFilesRemove":["src\/.babelrc","src\/.editorconfig","src\/.github\/**","src\/.travis.yml","src\/bin\/**","src\/caffeinated","src\/docs\/**","src\/info.json","src\/tests\/**","src\/wp-assets\/**"],"jsBuildDirectory":".\/","name":"Event Espresso Core","releaseFilesRemove":["src\/.babelrc","src\/.editorconfig","src\/.github\/**","src\/.travis.yml","src\/bin\/**","src\/docs\/**","src\/info.json","src\/readme.txt","src\/tests\/**","src\/wp-assets\/**"],"remoteNamesToPushTo":[],"slug":"event-espresso-core-reg","srcBuildFolderName":"event-espresso-core","textDomain":"event_espresso","versionFile":"espresso.php","wpi18nJsPotFilePath":".\/languages\/ee-js.pot","wpOrgMainFileSlug":"espresso","wpOrgPluginName":"Event Espresso 4 Decaf","wpOrgPluginUrl":"https:\/\/eventespresso.com\/pricing\/?ee_ver=ee4&utm_source=ee4_decaf_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link","wpOrgRelease":"5.0.28.p","wpOrgSlug":"event-espresso-decaf","wpOrgUser":"eventespresso"}
{
"awsbucket": "",
"awsregion": "",
"decafFilesRemove": [
"src\/.babelrc",
"src\/.editorconfig",
"src\/.github\/**",
"src\/.travis.yml",
"src\/bin\/**",
"src\/caffeinated",
"src\/docs\/**",
"src\/info.json",
"src\/tests\/**",
"src\/wp-assets\/**"
],
"jsBuildDirectory": ".\/",
"name": "Event Espresso Core",
"releaseFilesRemove": [
"src\/.babelrc",
"src\/.editorconfig",
"src\/.github\/**",
"src\/.travis.yml",
"src\/bin\/**",
"src\/docs\/**",
"src\/info.json",
"src\/readme.txt",
"src\/tests\/**",
"src\/wp-assets\/**"
],
"remoteNamesToPushTo": [],
"slug": "event-espresso-core-reg",
"srcBuildFolderName": "event-espresso-core",
"textDomain": "event_espresso",
"versionFile": "espresso.php",
"wpi18nJsPotFilePath": ".\/languages\/ee-js.pot",
"wpOrgMainFileSlug": "espresso",
"wpOrgPluginName": "Event Espresso 4 Decaf",
"wpOrgPluginUrl": "https:\/\/eventespresso.com\/pricing\/?ee_ver=ee4&utm_source=ee4_decaf_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link",
"wpOrgRelease": "5.0.28.p",
"wpOrgSlug": "event-espresso-decaf",
"wpOrgUser": "eventespresso"
}

0 comments on commit d359059

Please sign in to comment.