Skip to content

Commit fbc6d56

Browse files
RELEASE: 5.0.48
1 parent 86c07de commit fbc6d56

32 files changed

+749
-551
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Releases
88

9+
### 5.0.48
10+
11+
#### Added
12+
- [Implement Square Partner Fees (#1995)](https://github.com/eventespresso/cafe/pull/1995)
13+
- [New Thank You Page Hook (#2004)](https://github.com/eventespresso/cafe/pull/2004)
14+
15+
#### Fixed
16+
- [Fix CSV reports on SSL redirects (#2010)](https://github.com/eventespresso/cafe/pull/2010)
17+
18+
#### Changed
19+
- [Require ee_advanced_event_editor Cap to Duplicate Event (#1889)](https://github.com/eventespresso/cafe/pull/1889)
20+
- [Skip Session Save Path Filesystem Checks for open_basedir Violations (#2005)](https://github.com/eventespresso/cafe/pull/2005)
21+
- [Relax Restrictions Generator Action Type (#2008)](https://github.com/eventespresso/cafe/pull/2008)
22+
- [Allow for dynamic shortcode parameters within the message system (#2012)](https://github.com/eventespresso/cafe/pull/2012)
23+
24+
25+
26+
27+
28+
929
### [5.0.47]
1030

1131
#### Fixed

PaymentMethods/PayPalCommerce/PayPalCheckout/forms/SettingsForm.php

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use EE_Select_Input;
1212
use EE_Checkbox_Multi_Input;
1313
use EED_PayPalOnboard;
14-
use EEH_Array;
1514
use EEH_HTML;
1615
use EventEspresso\PaymentMethods\PayPalCommerce\domain\Domain;
1716
use EventEspresso\PaymentMethods\PayPalCommerce\tools\extra_meta\PayPalExtraMetaManager;
@@ -70,13 +69,6 @@ public function __construct(EE_PMT_PayPalCheckout $payment_method, EE_Payment_Me
7069
parent::__construct($form_parameters);
7170
// Add a form for PayPal Onboard.
7271
$this->addOnboardingForm($payment_method, $pm_instance);
73-
// Add a form for PayPal Onboard.
74-
add_filter(
75-
'FHEE__Payments_Admin_Page___generate_payment_method_settings_form__form_subsections',
76-
[__CLASS__, 'addFeesNotice'],
77-
10,
78-
2
79-
);
8072
// Add the clear data button.
8173
$this->clearMetadataButton($pm_instance);
8274
// Disable inputs if needed.
@@ -108,62 +100,6 @@ public function addOnboardingForm(EE_PMT_PayPalCheckout $payment_method, EE_Paym
108100
}
109101

110102

111-
/**
112-
* Add fees notice.
113-
*
114-
* @param array $subsections
115-
* @param EE_Payment_Method $payment_method
116-
* @return array
117-
* @throws EE_Error
118-
* @throws ReflectionException
119-
*/
120-
public static function addFeesNotice(array $subsections, EE_Payment_Method $payment_method): array
121-
{
122-
// We want to be able to disable fees. Also check if this is PayPal PM.
123-
if ((defined('EE_PPC_USE_PAYMENT_FEES') && ! EE_PPC_USE_PAYMENT_FEES)
124-
|| $payment_method->slug() !== 'paypalcheckout'
125-
) {
126-
return $subsections;
127-
}
128-
return EEH_Array::insert_into_array(
129-
$subsections,
130-
[
131-
'partner_fees_notice' => new EE_Form_Section_HTML(
132-
EEH_HTML::tr(
133-
EEH_HTML::th()
134-
. EEH_HTML::thx()
135-
. EEH_HTML::td(
136-
EEH_HTML::div(
137-
EEH_HTML::strong(
138-
esc_html__(
139-
'PayPal Partner Commission Fees are based upon the status of your Support License:',
140-
'event_espresso'
141-
)
142-
)
143-
. EEH_HTML::ul()
144-
. EEH_HTML::li(
145-
esc_html__('- Active licenses commission fees: 0%', 'event_espresso')
146-
)
147-
. EEH_HTML::li(
148-
esc_html__('- Expired license commission fees: 3%', 'event_espresso')
149-
)
150-
. EEH_HTML::ulx()
151-
. esc_html__(
152-
'Keep your support license active for: lower fees, up-to-date software and have access to our support team. By connecting and processing payments you agree to these terms.',
153-
'event_espresso'
154-
),
155-
'',
156-
'ee-status-outline ee-status-bg--info'
157-
)
158-
)
159-
)
160-
),
161-
],
162-
'fine_print'
163-
);
164-
}
165-
166-
167103
/**
168104
* Add a checkout type select.
169105
*

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.47
1+
5.0.48

admin_pages/events/Events_Admin_Page.core.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,7 +1726,7 @@ public function ticket_metabox()
17261726
*/
17271727
/** @var EEM_Datetime $datetime_model */
17281728
$datetime_model = EE_Registry::instance()->load_model('Datetime');
1729-
/** @var EEM_Ticket $datetime_model */
1729+
/** @var EEM_Ticket $ticket_model */
17301730
$ticket_model = EE_Registry::instance()->load_model('Ticket');
17311731
$times = $datetime_model->get_all_event_dates($event_id);
17321732
/** @type EE_Datetime $first_datetime */
@@ -1754,13 +1754,11 @@ public function ticket_metabox()
17541754
}
17551755
} else {
17561756
$template_args['total_ticket_rows'] = 1;
1757-
/** @type EE_Ticket $ticket */
17581757
$ticket = $ticket_model->create_default_object();
17591758
$template_args['ticket_rows'] .= $this->_get_ticket_row($ticket);
17601759
}
17611760
} else {
17621761
$template_args['time'] = $times[0];
1763-
/** @type EE_Ticket[] $tickets */
17641762
$tickets = $ticket_model->get_all_default_tickets();
17651763
$template_args['ticket_rows'] .= $this->_get_ticket_row($tickets[1]);
17661764
// NOTE: we're just sending the first default row

admin_pages/payments/Payments_Admin_Page.core.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use EventEspresso\core\services\database\TableAnalysis;
66
use EventEspresso\core\services\database\TableManager;
77
use EventEspresso\core\services\loaders\LoaderFactory;
8+
use EventEspresso\core\services\payments\PaymentProcessorFees;
89
use EventEspresso\core\services\request\sanitizers\AllowedTags;
910

1011
/**
@@ -543,6 +544,7 @@ protected function _generate_payment_method_settings_form(
543544
'update' => $this->_update_payment_method_button($payment_method),
544545
'deactivate' => $this->_deactivate_payment_method_button($payment_method),
545546
'fine_print' => $this->_fine_print(),
547+
'partner_fees_notice' => $this->partnerFeesNotice($payment_method),
546548
],
547549
$payment_method
548550
);
@@ -885,6 +887,31 @@ protected function _fine_print(): EE_Form_Section_HTML
885887
}
886888

887889

890+
/**
891+
* partnerFeesNotice
892+
*
893+
* @access protected
894+
* @param EE_Payment_Method $payment_method
895+
* @return ?EE_Form_Section_HTML
896+
*/
897+
protected function partnerFeesNotice(EE_Payment_Method $payment_method): ?EE_Form_Section_HTML
898+
{
899+
/** @var PaymentProcessorFees $payment_proc_fees */
900+
$payment_proc_fees = LoaderFactory::getLoader()->getShared(
901+
'EventEspresso\core\services\payments\PaymentProcessorFees'
902+
);
903+
try {
904+
$pm_name = $payment_method->name();
905+
} catch (EE_Error|ReflectionException $e) {
906+
return null;
907+
}
908+
if (! $payment_proc_fees->isPartnerGateway($pm_name)) {
909+
return null;
910+
}
911+
return $payment_proc_fees->getFeesNotice($pm_name);
912+
}
913+
914+
888915
/**
889916
* Activates a payment method of that type. Mostly assuming there is only 1 of that type (or none so far)
890917
*

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use EventEspresso\core\domain\services\admin\events\editor\ui\DuplicateEventButton;
55
use EventEspresso\core\domain\services\admin\events\editor\ui\TicketSelectorShortcodeButton;
66
use EventEspresso\core\domain\services\cache\TemplateCacheAdmin;
7+
use EventEspresso\core\domain\services\capabilities\FeatureFlag;
78
use EventEspresso\core\domain\services\registration\RegStatus;
89
use EventEspresso\core\exceptions\InvalidDataTypeException;
910
use EventEspresso\core\exceptions\InvalidInterfaceException;
@@ -208,9 +209,12 @@ protected function _set_page_config()
208209
// legend item
209210
add_filter('FHEE__Events_Admin_Page___event_legend_items__items', [$this, 'additional_legend_items']);
210211
add_action('admin_init', [$this, 'admin_init']);
211-
// this is a filter that allows the addition of extra html after the permalink field on the wp post edit-form
212-
// add_filter('get_sample_permalink_html', [DuplicateEventButton::class, 'addButton'], 8, 2);
213-
DuplicateEventButton::addEventEditorPermalinkButton(8);
212+
213+
if ($this->feature->allowed(FeatureFlag::USE_ADVANCED_EVENT_EDITOR)) {
214+
// this is a filter that allows the addition of extra html after the permalink field on the wp post edit-form
215+
// add_filter('get_sample_permalink_html', [DuplicateEventButton::class, 'addButton'], 8, 2);
216+
DuplicateEventButton::addEventEditorPermalinkButton(8);
217+
}
214218
}
215219

216220

@@ -264,8 +268,11 @@ public function extra_permalink_field_buttons(
264268
?string $new_title,
265269
?string $new_slug
266270
): string {
267-
$return = DuplicateEventButton::addButton($return, $id, $new_title, $new_slug);
268-
return TicketSelectorShortcodeButton::addButton($return, $id, $new_title, $new_slug);
271+
272+
if ($this->feature->allowed(FeatureFlag::USE_ADVANCED_EVENT_EDITOR)) {
273+
$return = DuplicateEventButton::addButton($return, $id);
274+
}
275+
return TicketSelectorShortcodeButton::addButton($return, $id);
269276
}
270277

271278

core/admin/assets/ee-admin-base.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,7 @@
773773
.wp-core-ui .espresso-notices.notice,
774774
.wp-core-ui .espresso-notices.error,
775775
.wp-core-ui .espresso-notices.updated {
776-
align-items: center;
777-
display: flex;
778-
flex-direction: row-reverse;
776+
display: block;
779777
padding: calc(.5 * var(--ee-base-ui-scale)) var(--ee-base-ui-scale);
780778
}
781779

@@ -790,7 +788,9 @@
790788
}
791789

792790
.wp-core-ui .espresso-notices.notice.ee-nag-notice {
793-
display: block;
791+
align-items: center;
792+
display: flex;
793+
flex-direction: row-reverse;
794794
padding-block: var(--ee-padding-default);
795795
padding-inline: var(--ee-padding-big);
796796
position: relative;

core/admin/assets/ee-admin-page.css

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5835,29 +5835,46 @@ body.espresso-admin #contextual-help-wrap strong {
58355835
width: var(--ee-font-size-2xl);
58365836
}
58375837

5838+
.espresso-admin.wp-core-ui .dashicons.dashicons--tiny,
5839+
.espresso-admin.wp-core-ui .dashicons.dashicons--tiny:before,
5840+
.espresso-admin.wp-core-ui .button--tiny:not(.button--icon-only) .dashicons,
5841+
.espresso-admin.wp-core-ui .button--tiny:not(.button--icon-only) .dashicons:before {
5842+
font-size: var(--ee-font-size-default);
5843+
height: var(--ee-font-size-default);
5844+
width: var(--ee-font-size-default);
5845+
}
5846+
58385847
.espresso-admin.wp-core-ui .dashicons.dashicons--small,
5839-
.espresso-admin.wp-core-ui .dashicons.dashicons--small:before {
5848+
.espresso-admin.wp-core-ui .dashicons.dashicons--small:before,
5849+
.espresso-admin.wp-core-ui .button--small:not(.button--icon-only) .dashicons,
5850+
.espresso-admin.wp-core-ui .button--small:not(.button--icon-only) .dashicons:before {
58405851
font-size: var(--ee-font-size-bigger);
58415852
height: var(--ee-font-size-bigger);
58425853
width: var(--ee-font-size-bigger);
58435854
}
58445855

58455856
.espresso-admin.wp-core-ui .dashicons.dashicons--big,
5846-
.espresso-admin.wp-core-ui .dashicons.dashicons--big:before {
5857+
.espresso-admin.wp-core-ui .dashicons.dashicons--big:before,
5858+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons,
5859+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons:before {
58475860
font-size: var(--ee-font-size-4xl);
58485861
height: var(--ee-font-size-4xl);
58495862
width: var(--ee-font-size-4xl);
58505863
}
58515864

58525865
.espresso-admin.wp-core-ui .dashicons.dashicons--bigger,
5853-
.espresso-admin.wp-core-ui .dashicons.dashicons--bigger:before {
5866+
.espresso-admin.wp-core-ui .dashicons.dashicons--bigger:before,
5867+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons,
5868+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons:before {
58545869
font-size: var(--ee-font-size-7xl);
58555870
height: var(--ee-font-size-7xl);
58565871
width: var(--ee-font-size-7xl);
58575872
}
58585873

58595874
.espresso-admin.wp-core-ui .dashicons.dashicons--huge,
5860-
.espresso-admin.wp-core-ui .dashicons.dashicons--huge:before {
5875+
.espresso-admin.wp-core-ui .dashicons.dashicons--huge:before,
5876+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons,
5877+
.espresso-admin.wp-core-ui .button--big:not(.button--icon-only) .dashicons:before {
58615878
font-size: var(--ee-font-size-9xl);
58625879
height: var(--ee-font-size-9xl);
58635880
width: var(--ee-font-size-9xl);

core/db_classes/EE_CSV.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public function write_metadata_to_csv($filehandle)
371371
'version' => espresso_version(),
372372
'timezone' => EEH_DTT_Helper::get_timezone(),
373373
'time_of_export' => current_time('mysql'),
374-
'site_url' => site_url(),
374+
'site_url' => is_ssl() ? str_replace('http://', 'https://', site_url()) : site_url(),
375375
),
376376
);
377377
$this->write_data_array_to_csv($filehandle, $meta_data);

core/db_models/EEM_Base.model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,11 +3070,11 @@ public function get_one_conflicting($obj_or_fields_array, $include_primary_key =
30703070
* Like count, but is optimized and returns a boolean instead of an int
30713071
*
30723072
* @param array $query_params
3073-
* @return boolean
3073+
* @return bool
30743074
* @throws EE_Error
30753075
* @throws ReflectionException
30763076
*/
3077-
public function exists($query_params)
3077+
public function exists(array $query_params): bool
30783078
{
30793079
$query_params['limit'] = 1;
30803080
return $this->count($query_params) > 0;

0 commit comments

Comments
 (0)