Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 5.5.1 |
Comparing to | |
See all releases |
Code changes from version 5.5.0 to 5.5.1
- common/lang/tribe-common-de_DE.mo +0 -0
- common/src/Tribe/Context.php +17 -1
- common/src/Tribe/Context/locations.php +8 -0
- common/src/Tribe/Cost_Utils.php +1 -1
- common/src/Tribe/Customizer.php +2 -2
- common/src/Tribe/Main.php +7 -7
- common/src/Tribe/Repository.php +13 -1
- common/src/Tribe/Repository/Decorator.php +7 -0
- common/src/Tribe/Repository/Interface.php +9 -0
- common/src/Tribe/Utils/Array.php +1 -1
- common/src/functions/utils.php +21 -2
- common/vendor/autoload.php +1 -1
- common/vendor/autoload_52.php +1 -1
- common/vendor/composer/autoload_real.php +4 -4
- common/vendor/composer/autoload_real_52.php +3 -3
- common/vendor/composer/autoload_static.php +5 -5
- common/vendor/composer/installed.json +6 -6
- event-tickets.php +1 -1
- lang/event-tickets-da_DK.mo +0 -0
- lang/event-tickets-de_DE.mo +0 -0
- lang/event-tickets-es_ES.mo +0 -0
- lang/event-tickets-fr_CA.mo +0 -0
- lang/event-tickets-fr_FR.mo +0 -0
- lang/event-tickets-it_IT.mo +0 -0
- lang/event-tickets-nl_NL.mo +0 -0
- lang/event-tickets-ro_RO.mo +0 -0
- lang/event-tickets-sv_SE.mo +0 -0
- readme.txt +8 -1
- src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php +5 -5
- src/Tickets/Custom_Tables/V1/Provider.php +5 -5
- src/Tribe/Main.php +1 -1
- src/Tribe/Tickets.php +17 -11
- src/Tribe/Tickets_Handler.php +2 -1
- src/resources/js/commerce/gateway/paypal/checkout.js +4 -3
- src/views/v2/commerce/gateway/paypal/advanced-payments.php +3 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
common/lang/tribe-common-de_DE.mo
CHANGED
Binary file
|
common/src/Tribe/Context.php
CHANGED
@@ -282,7 +282,23 @@ class Tribe__Context {
|
|
282 |
}
|
283 |
|
284 |
if ( ! empty( $post_or_type ) ) {
|
285 |
-
$lookup = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
$current_post = Tribe__Utils__Array::get_in_any( $lookup, 'post', get_post() );
|
288 |
|
282 |
}
|
283 |
|
284 |
if ( ! empty( $post_or_type ) ) {
|
285 |
+
$lookup = [];
|
286 |
+
// Prevent a slew of warnings every time we call this.
|
287 |
+
if ( isset( $_REQUEST ) ) {
|
288 |
+
$lookup[] = (array) $_REQUEST;
|
289 |
+
}
|
290 |
+
|
291 |
+
if ( isset( $_GET ) ) {
|
292 |
+
$lookup[] = (array) $_GET;
|
293 |
+
}
|
294 |
+
|
295 |
+
if ( isset( $_POST ) ) {
|
296 |
+
$lookup[] = (array) $_POST;
|
297 |
+
}
|
298 |
+
|
299 |
+
if ( empty( $lookup ) ) {
|
300 |
+
return false;
|
301 |
+
}
|
302 |
|
303 |
$current_post = Tribe__Utils__Array::get_in_any( $lookup, 'post', get_post() );
|
304 |
|
common/src/Tribe/Context/locations.php
CHANGED
@@ -47,6 +47,14 @@ return [
|
|
47 |
Tribe__Context::FUNC => static function () {
|
48 |
global $wp_query;
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
return $wp_query->is_main_query();
|
51 |
},
|
52 |
],
|
47 |
Tribe__Context::FUNC => static function () {
|
48 |
global $wp_query;
|
49 |
|
50 |
+
if ( empty( $wp_query ) ) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( ! $wp_query instanceof WP_Query ) {
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
|
58 |
return $wp_query->is_main_query();
|
59 |
},
|
60 |
],
|
common/src/Tribe/Cost_Utils.php
CHANGED
@@ -111,7 +111,7 @@ class Tribe__Cost_Utils {
|
|
111 |
is_numeric( $cost_with_period )
|
112 |
&& '0.00' === number_format( $cost_with_period, 2, '.', ',' )
|
113 |
) {
|
114 |
-
return esc_html__( 'Free', '
|
115 |
}
|
116 |
|
117 |
return $cost;
|
111 |
is_numeric( $cost_with_period )
|
112 |
&& '0.00' === number_format( $cost_with_period, 2, '.', ',' )
|
113 |
) {
|
114 |
+
return esc_html__( 'Free', 'tribe-common' );
|
115 |
}
|
116 |
|
117 |
return $cost;
|
common/src/Tribe/Customizer.php
CHANGED
@@ -1049,11 +1049,11 @@ final class Tribe__Customizer {
|
|
1049 |
$new_settings = [
|
1050 |
'tribe-customizer-section-title' => [
|
1051 |
'type' => 'html',
|
1052 |
-
'html' => '<h3>' . __( 'Customizer', '
|
1053 |
],
|
1054 |
'tribe-customizer-link-description' => [
|
1055 |
'type' => 'html',
|
1056 |
-
'html' => '<p class="contained">' . __( 'Adjust colors, fonts, and more with the WordPress Customizer.', '
|
1057 |
],
|
1058 |
'tribe-customizer-link' => [
|
1059 |
'type' => 'html',
|
1049 |
$new_settings = [
|
1050 |
'tribe-customizer-section-title' => [
|
1051 |
'type' => 'html',
|
1052 |
+
'html' => '<h3>' . __( 'Customizer', 'tribe-common' ) . '</h3>',
|
1053 |
],
|
1054 |
'tribe-customizer-link-description' => [
|
1055 |
'type' => 'html',
|
1056 |
+
'html' => '<p class="contained">' . __( 'Adjust colors, fonts, and more with the WordPress Customizer.', 'tribe-common' ) . '</p>',
|
1057 |
],
|
1058 |
'tribe-customizer-link' => [
|
1059 |
'type' => 'html',
|
common/src/Tribe/Main.php
CHANGED
@@ -21,7 +21,7 @@ class Tribe__Main {
|
|
21 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
22 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
23 |
|
24 |
-
const VERSION = '5.0.
|
25 |
|
26 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
27 |
|
@@ -412,12 +412,12 @@ class Tribe__Main {
|
|
412 |
'monthNames' => $datepicker_months,
|
413 |
'monthNamesShort' => $datepicker_months, // We deliberately use full month names here,
|
414 |
'monthNamesMin' => array_values( Tribe__Date_Utils::get_localized_months_short() ),
|
415 |
-
'nextText' => esc_html__( 'Next', '
|
416 |
-
'prevText' => esc_html__( 'Prev', '
|
417 |
-
'currentText' => esc_html__( 'Today', '
|
418 |
-
'closeText' => esc_html__( 'Done', '
|
419 |
-
'today' => esc_html__( 'Today', '
|
420 |
-
'clear' => esc_html__( 'Clear', '
|
421 |
],
|
422 |
] );
|
423 |
}
|
21 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
22 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
23 |
|
24 |
+
const VERSION = '5.0.1';
|
25 |
|
26 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
27 |
|
412 |
'monthNames' => $datepicker_months,
|
413 |
'monthNamesShort' => $datepicker_months, // We deliberately use full month names here,
|
414 |
'monthNamesMin' => array_values( Tribe__Date_Utils::get_localized_months_short() ),
|
415 |
+
'nextText' => esc_html__( 'Next', 'tribe-common' ),
|
416 |
+
'prevText' => esc_html__( 'Prev', 'tribe-common' ),
|
417 |
+
'currentText' => esc_html__( 'Today', 'tribe-common' ),
|
418 |
+
'closeText' => esc_html__( 'Done', 'tribe-common' ),
|
419 |
+
'today' => esc_html__( 'Today', 'tribe-common' ),
|
420 |
+
'clear' => esc_html__( 'Clear', 'tribe-common' ),
|
421 |
],
|
422 |
] );
|
423 |
}
|
common/src/Tribe/Repository.php
CHANGED
@@ -2922,7 +2922,10 @@ abstract class Tribe__Repository
|
|
2922 |
}
|
2923 |
|
2924 |
foreach ( $this->updates as $key => $value ) {
|
2925 |
-
if (
|
|
|
|
|
|
|
2926 |
$value = $value( $id, $key, $this );
|
2927 |
}
|
2928 |
|
@@ -3725,4 +3728,13 @@ abstract class Tribe__Repository
|
|
3725 |
|
3726 |
return $this;
|
3727 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3728 |
}
|
2922 |
}
|
2923 |
|
2924 |
foreach ( $this->updates as $key => $value ) {
|
2925 |
+
if (
|
2926 |
+
$value instanceof Closure ||
|
2927 |
+
( is_array( $value ) && is_callable( $value ) )
|
2928 |
+
) {
|
2929 |
$value = $value( $id, $key, $this );
|
2930 |
}
|
2931 |
|
3728 |
|
3729 |
return $this;
|
3730 |
}
|
3731 |
+
|
3732 |
+
/**
|
3733 |
+
* {@inheritDoc}
|
3734 |
+
*/
|
3735 |
+
public function get_last_sql(): ?string {
|
3736 |
+
return $this->last_built_query instanceof WP_Query ?
|
3737 |
+
$this->last_built_query->request
|
3738 |
+
: null;
|
3739 |
+
}
|
3740 |
}
|
common/src/Tribe/Repository/Decorator.php
CHANGED
@@ -685,4 +685,11 @@ abstract class Tribe__Repository__Decorator implements Tribe__Repository__Interf
|
|
685 |
|
686 |
return $this;
|
687 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
}
|
685 |
|
686 |
return $this;
|
687 |
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
* {@inheritDoc}
|
691 |
+
*/
|
692 |
+
public function get_last_sql(): ?string {
|
693 |
+
return $this->decorated->get_last_sql();
|
694 |
+
}
|
695 |
}
|
common/src/Tribe/Repository/Interface.php
CHANGED
@@ -320,4 +320,13 @@ interface Tribe__Repository__Interface
|
|
320 |
* @return Tribe__Repository__Interface $this The repository instance.
|
321 |
*/
|
322 |
public function void_query( $void_query = true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
}
|
320 |
* @return Tribe__Repository__Interface $this The repository instance.
|
321 |
*/
|
322 |
public function void_query( $void_query = true );
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Returns the SQL code for the last query built and ran by the repository, if any.
|
326 |
+
*
|
327 |
+
* @since 5.0.1
|
328 |
+
*
|
329 |
+
* @return string|null The SQL code for the last query built and ran by the repository, if any.
|
330 |
+
*/
|
331 |
+
public function get_last_sql(): ?string;
|
332 |
}
|
common/src/Tribe/Utils/Array.php
CHANGED
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Tribe__Utils__Array' ) ) {
|
|
35 |
// would likely lead to unexpected problems for whatever first set it.
|
36 |
$error = sprintf(
|
37 |
'Attempted to set $array[%1$s] but %2$s is already set and is not an array.',
|
38 |
-
implode(
|
39 |
$i
|
40 |
);
|
41 |
|
35 |
// would likely lead to unexpected problems for whatever first set it.
|
36 |
$error = sprintf(
|
37 |
'Attempted to set $array[%1$s] but %2$s is already set and is not an array.',
|
38 |
+
implode( '][', $key ),
|
39 |
$i
|
40 |
);
|
41 |
|
common/src/functions/utils.php
CHANGED
@@ -144,7 +144,26 @@ if ( ! function_exists( 'tribe_get_request_var' ) ) {
|
|
144 |
* @return mixed
|
145 |
*/
|
146 |
function tribe_get_request_var( $var, $default = null ) {
|
147 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
return tribe_sanitize_deep( $unsafe );
|
149 |
}
|
150 |
}
|
@@ -1107,7 +1126,7 @@ if ( ! function_exists( 'tribe_sanitize_deep' ) ) {
|
|
1107 |
return $value;
|
1108 |
}
|
1109 |
if ( is_string( $value ) ) {
|
1110 |
-
$value = filter_var( $value,
|
1111 |
return $value;
|
1112 |
}
|
1113 |
if ( is_int( $value ) ) {
|
144 |
* @return mixed
|
145 |
*/
|
146 |
function tribe_get_request_var( $var, $default = null ) {
|
147 |
+
$requests = [];
|
148 |
+
|
149 |
+
// Prevent a slew of warnings every time we call this.
|
150 |
+
if ( isset( $_REQUEST ) ) {
|
151 |
+
$requests[] = (array) $_REQUEST;
|
152 |
+
}
|
153 |
+
|
154 |
+
if ( isset( $_GET ) ) {
|
155 |
+
$requests[] = (array) $_GET;
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( isset( $_POST ) ) {
|
159 |
+
$requests[] = (array) $_POST;
|
160 |
+
}
|
161 |
+
|
162 |
+
if ( empty( $requests ) ) {
|
163 |
+
return $default;
|
164 |
+
}
|
165 |
+
|
166 |
+
$unsafe = Tribe__Utils__Array::get_in_any( $requests, $var, $default );
|
167 |
return tribe_sanitize_deep( $unsafe );
|
168 |
}
|
169 |
}
|
1126 |
return $value;
|
1127 |
}
|
1128 |
if ( is_string( $value ) ) {
|
1129 |
+
$value = filter_var( $value, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES );
|
1130 |
return $value;
|
1131 |
}
|
1132 |
if ( is_int( $value ) ) {
|
common/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit881fdf7d174fe7f99b7faaf6bda53d99::getLoader();
|
common/vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit232a9e5fc4fb96ba622ed0ddf0210ab6::getLoader();
|
common/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit09a30edff1bad47ad8b1b41aa95174f3
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit881fdf7d174fe7f99b7faaf6bda53d99
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit881fdf7d174fe7f99b7faaf6bda53d99', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit881fdf7d174fe7f99b7faaf6bda53d99', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
common/vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit33cade010b74c62bb44915bc0ad5ea57 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit232a9e5fc4fb96ba622ed0ddf0210ab6 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit232a9e5fc4fb96ba622ed0ddf0210ab6', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit232a9e5fc4fb96ba622ed0ddf0210ab6', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
common/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -270,10 +270,10 @@ class ComposerStaticInit09a30edff1bad47ad8b1b41aa95174f3
|
|
270 |
public static function getInitializer(ClassLoader $loader)
|
271 |
{
|
272 |
return \Closure::bind(function () use ($loader) {
|
273 |
-
$loader->prefixLengthsPsr4 =
|
274 |
-
$loader->prefixDirsPsr4 =
|
275 |
-
$loader->prefixesPsr0 =
|
276 |
-
$loader->classMap =
|
277 |
|
278 |
}, null, ClassLoader::class);
|
279 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
270 |
public static function getInitializer(ClassLoader $loader)
|
271 |
{
|
272 |
return \Closure::bind(function () use ($loader) {
|
273 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99::$prefixLengthsPsr4;
|
274 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99::$prefixDirsPsr4;
|
275 |
+
$loader->prefixesPsr0 = ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99::$prefixesPsr0;
|
276 |
+
$loader->classMap = ComposerStaticInit881fdf7d174fe7f99b7faaf6bda53d99::$classMap;
|
277 |
|
278 |
}, null, ClassLoader::class);
|
279 |
}
|
common/vendor/composer/installed.json
CHANGED
@@ -223,20 +223,20 @@
|
|
223 |
},
|
224 |
{
|
225 |
"name": "xrstf/composer-php52",
|
226 |
-
"version": "v1.0.
|
227 |
-
"version_normalized": "1.0.
|
228 |
"source": {
|
229 |
"type": "git",
|
230 |
"url": "https://github.com/composer-php52/composer-php52.git",
|
231 |
-
"reference": "
|
232 |
},
|
233 |
"dist": {
|
234 |
"type": "zip",
|
235 |
-
"url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/
|
236 |
-
"reference": "
|
237 |
"shasum": ""
|
238 |
},
|
239 |
-
"time": "
|
240 |
"type": "library",
|
241 |
"extra": {
|
242 |
"branch-alias": {
|
223 |
},
|
224 |
{
|
225 |
"name": "xrstf/composer-php52",
|
226 |
+
"version": "v1.0.21",
|
227 |
+
"version_normalized": "1.0.21.0",
|
228 |
"source": {
|
229 |
"type": "git",
|
230 |
"url": "https://github.com/composer-php52/composer-php52.git",
|
231 |
+
"reference": "670ac996f93792f8de0427605cfef342b3429ff3"
|
232 |
},
|
233 |
"dist": {
|
234 |
"type": "zip",
|
235 |
+
"url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/670ac996f93792f8de0427605cfef342b3429ff3",
|
236 |
+
"reference": "670ac996f93792f8de0427605cfef342b3429ff3",
|
237 |
"shasum": ""
|
238 |
},
|
239 |
+
"time": "2022-06-08T03:23:46+00:00",
|
240 |
"type": "library",
|
241 |
"extra": {
|
242 |
"branch-alias": {
|
event-tickets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
-
Version: 5.5.
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
+
Version: 5.5.1
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
lang/event-tickets-da_DK.mo
CHANGED
Binary file
|
lang/event-tickets-de_DE.mo
CHANGED
Binary file
|
lang/event-tickets-es_ES.mo
CHANGED
Binary file
|
lang/event-tickets-fr_CA.mo
CHANGED
Binary file
|
lang/event-tickets-fr_FR.mo
CHANGED
Binary file
|
lang/event-tickets-it_IT.mo
CHANGED
Binary file
|
lang/event-tickets-nl_NL.mo
CHANGED
Binary file
|
lang/event-tickets-ro_RO.mo
CHANGED
Binary file
|
lang/event-tickets-sv_SE.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: theeventscalendar, brianjessee, camwynsp, aguseo, bordoni, borkweb
|
|
4 |
Tags: tickets, registration, event registration, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.8.4
|
6 |
Tested up to: 6.0.2
|
7 |
-
Stable tag: 5.5.
|
8 |
Requires PHP: 7.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -188,6 +188,13 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
= [5.5.0] 2022-09-06 =
|
192 |
|
193 |
* Version - Event Tickets 5.5.0 is only compatible with The Events Calendar 6.0.0 and higher.
|
4 |
Tags: tickets, registration, event registration, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.8.4
|
6 |
Tested up to: 6.0.2
|
7 |
+
Stable tag: 5.5.1
|
8 |
Requires PHP: 7.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= [5.5.1] 2022-09-22 =
|
192 |
+
|
193 |
+
* Fix - Listing tickets is no longer limited by the global settings. [ET-1584]
|
194 |
+
* Fix - Correct parameter type hinting when param can be null. [ET-1582]
|
195 |
+
* Fix - Showing Checkout not available and credit card fields at the same time for PayPal gateway in TicketsCommerce. [ETP-812]
|
196 |
+
* Language - 0 new strings added, 1 updated, 0 fuzzied, and 0 obsoleted
|
197 |
+
|
198 |
= [5.5.0] 2022-09-06 =
|
199 |
|
200 |
* Version - Event Tickets 5.5.0 is only compatible with The Events Calendar 6.0.0 and higher.
|
src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php
CHANGED
@@ -236,11 +236,11 @@ class Payment_Intent_Handler {
|
|
236 |
$tickets_in_order
|
237 |
);
|
238 |
|
239 |
-
$metadata[
|
240 |
-
$metadata[
|
241 |
-
$metadata[
|
242 |
-
$metadata[
|
243 |
-
$metadata[
|
244 |
|
245 |
/**
|
246 |
* Filter the updated metadata for a completed order's payment intent.
|
236 |
$tickets_in_order
|
237 |
);
|
238 |
|
239 |
+
$metadata['purchaser_name'] = $order->purchaser_name;
|
240 |
+
$metadata['purchaser_email'] = $order->purchaser_email;
|
241 |
+
$metadata['event_name'] = get_post( current( $events_in_order ) )->post_title;
|
242 |
+
$metadata['event_url'] = get_post_permalink( current( $events_in_order ) );
|
243 |
+
$metadata['ticket_names'] = implode( ' ,', $ticket_names );
|
244 |
|
245 |
/**
|
246 |
* Filter the updated metadata for a completed order's payment intent.
|
src/Tickets/Custom_Tables/V1/Provider.php
CHANGED
@@ -42,7 +42,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
42 |
define( 'TEC_ET_CUSTOM_TABLES_V1_ROOT', __DIR__ );
|
43 |
}
|
44 |
|
45 |
-
$this->
|
46 |
|
47 |
add_filter( 'admin_body_class', [ $this, 'prevent_tickets_on_recurring_events' ] );
|
48 |
add_filter( 'body_class', [ $this, 'prevent_tickets_on_recurring_events_front_end' ] );
|
@@ -58,7 +58,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
58 |
*
|
59 |
* @since 5.5.0
|
60 |
*/
|
61 |
-
private function
|
62 |
$state = $this->container->make( State::class );
|
63 |
|
64 |
if ( $state->should_lock_for_maintenance() ) {
|
@@ -67,7 +67,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
-
* Filter the body
|
71 |
* recurring Events or ticketed Events from being made recurring.
|
72 |
*
|
73 |
* @since 5.5.0
|
@@ -77,7 +77,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
77 |
* @return string A space-separated list of classes, updated to include the
|
78 |
* `tec-no-tickets-on-recurring` class.
|
79 |
*/
|
80 |
-
public function prevent_tickets_on_recurring_events( string $admin_body_classes ): string {
|
81 |
$state = $this->container->make( State::class );
|
82 |
|
83 |
if ( ! $state->is_migrated() ) {
|
@@ -108,4 +108,4 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
108 |
$classes = $this->prevent_tickets_on_recurring_events( $classes );
|
109 |
return explode( ' ', $classes );
|
110 |
}
|
111 |
-
}
|
42 |
define( 'TEC_ET_CUSTOM_TABLES_V1_ROOT', __DIR__ );
|
43 |
}
|
44 |
|
45 |
+
$this->lock_for_maintenance();
|
46 |
|
47 |
add_filter( 'admin_body_class', [ $this, 'prevent_tickets_on_recurring_events' ] );
|
48 |
add_filter( 'body_class', [ $this, 'prevent_tickets_on_recurring_events_front_end' ] );
|
58 |
*
|
59 |
* @since 5.5.0
|
60 |
*/
|
61 |
+
private function lock_for_maintenance(): void {
|
62 |
$state = $this->container->make( State::class );
|
63 |
|
64 |
if ( $state->should_lock_for_maintenance() ) {
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
+
* Filter the body classes in admin context to prevent tickets from being added to
|
71 |
* recurring Events or ticketed Events from being made recurring.
|
72 |
*
|
73 |
* @since 5.5.0
|
77 |
* @return string A space-separated list of classes, updated to include the
|
78 |
* `tec-no-tickets-on-recurring` class.
|
79 |
*/
|
80 |
+
public function prevent_tickets_on_recurring_events( ?string $admin_body_classes ): string {
|
81 |
$state = $this->container->make( State::class );
|
82 |
|
83 |
if ( ! $state->is_migrated() ) {
|
108 |
$classes = $this->prevent_tickets_on_recurring_events( $classes );
|
109 |
return explode( ' ', $classes );
|
110 |
}
|
111 |
+
}
|
src/Tribe/Main.php
CHANGED
@@ -8,7 +8,7 @@ class Tribe__Tickets__Main {
|
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
-
const VERSION = '5.5.
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
+
const VERSION = '5.5.1';
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
src/Tribe/Tickets.php
CHANGED
@@ -373,20 +373,26 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
-
*
|
377 |
*
|
378 |
* @since 5.5.0 refactored to use the tickets ORM.
|
379 |
* @since 4.6
|
|
|
380 |
*
|
381 |
* @param int|WP_Post $post_id Build the args to query only
|
382 |
* for tickets related to this post ID.
|
383 |
*
|
384 |
-
* @return
|
385 |
*/
|
386 |
-
public function
|
387 |
$repository = tribe_tickets( $this->orm_provider );
|
388 |
$repository->by( 'event', $post_id );
|
389 |
-
$
|
|
|
|
|
|
|
|
|
|
|
390 |
|
391 |
/**
|
392 |
* Filters the query arguments that will be used to fetch tickets.
|
@@ -395,9 +401,13 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
395 |
*
|
396 |
* @param array $args
|
397 |
*/
|
398 |
-
$
|
|
|
|
|
|
|
|
|
399 |
|
400 |
-
return $
|
401 |
}
|
402 |
|
403 |
/**
|
@@ -429,11 +439,7 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
429 |
}
|
430 |
}
|
431 |
|
432 |
-
|
433 |
-
$repository = tribe_tickets( $this->orm_provider );
|
434 |
-
$repository->by_args( $args );
|
435 |
-
|
436 |
-
return $repository->get_ids();
|
437 |
}
|
438 |
|
439 |
/**
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
+
* Set the Query args to fetch all the Tickets.
|
377 |
*
|
378 |
* @since 5.5.0 refactored to use the tickets ORM.
|
379 |
* @since 4.6
|
380 |
+
* @since TBD Set default query args.
|
381 |
*
|
382 |
* @param int|WP_Post $post_id Build the args to query only
|
383 |
* for tickets related to this post ID.
|
384 |
*
|
385 |
+
* @return Tribe__Repository__Interface
|
386 |
*/
|
387 |
+
public function set_tickets_query_args( $post_id = null ) {
|
388 |
$repository = tribe_tickets( $this->orm_provider );
|
389 |
$repository->by( 'event', $post_id );
|
390 |
+
$repository->by( 'status', 'publish' );
|
391 |
+
$repository->by( 'posts_per_page', -1 );
|
392 |
+
$repository->order_by( 'menu_order' );
|
393 |
+
$repository->order( 'ASC' );
|
394 |
+
$default_args = $repository->get_query();
|
395 |
+
|
396 |
|
397 |
/**
|
398 |
* Filters the query arguments that will be used to fetch tickets.
|
401 |
*
|
402 |
* @param array $args
|
403 |
*/
|
404 |
+
$vars = apply_filters( 'tribe_tickets_get_tickets_query_args', $default_args->query_vars );
|
405 |
+
|
406 |
+
if ( $default_args->query_vars !== $vars ) {
|
407 |
+
$repository->by_args( $vars );
|
408 |
+
}
|
409 |
|
410 |
+
return $repository;
|
411 |
}
|
412 |
|
413 |
/**
|
439 |
}
|
440 |
}
|
441 |
|
442 |
+
return $this->set_tickets_query_args( $post_id )->get_ids();
|
|
|
|
|
|
|
|
|
443 |
}
|
444 |
|
445 |
/**
|
src/Tribe/Tickets_Handler.php
CHANGED
@@ -517,7 +517,8 @@ class Tribe__Tickets__Tickets_Handler {
|
|
517 |
|
518 |
foreach ( $modules as $provider_class => $name ) {
|
519 |
$provider = call_user_func( array( $provider_class, 'get_instance' ) );
|
520 |
-
$module_args = $provider->
|
|
|
521 |
|
522 |
$args['post_type'] = array_merge( (array) $args['post_type'], (array) $module_args['post_type'] );
|
523 |
$args['meta_query'] = array_merge( (array) $args['meta_query'], (array) $module_args['meta_query'] );
|
517 |
|
518 |
foreach ( $modules as $provider_class => $name ) {
|
519 |
$provider = call_user_func( array( $provider_class, 'get_instance' ) );
|
520 |
+
$module_args = $provider->set_tickets_query_args( $post )->get_query();
|
521 |
+
$module_args = $module_args->query_vars;
|
522 |
|
523 |
$args['post_type'] = array_merge( (array) $args['post_type'], (array) $module_args['post_type'] );
|
524 |
$args['meta_query'] = array_merge( (array) $args['meta_query'], (array) $module_args['meta_query'] );
|
src/resources/js/commerce/gateway/paypal/checkout.js
CHANGED
@@ -95,6 +95,7 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
95 |
nameField: '#tec-tc-card-holder-name',
|
96 |
expirationField: '#tec-tc-expiration-date',
|
97 |
},
|
|
|
98 |
};
|
99 |
|
100 |
/**
|
@@ -650,12 +651,12 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
650 |
obj.setupAdvancedPayments = ( event, $container ) => {
|
651 |
// If this returns false or the card fields aren't visible, see Step #1.
|
652 |
if ( ! paypal.HostedFields.isEligible() ) {
|
653 |
-
//
|
654 |
-
$container.find( obj.selectors.advancedPayments.form ).hide();
|
655 |
-
|
656 |
return;
|
657 |
}
|
658 |
|
|
|
|
|
659 |
/**
|
660 |
* See references on how to use:
|
661 |
* https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#paypalhostedfields
|
95 |
nameField: '#tec-tc-card-holder-name',
|
96 |
expirationField: '#tec-tc-expiration-date',
|
97 |
},
|
98 |
+
hiddenElement: '.tribe-common-a11y-hidden',
|
99 |
};
|
100 |
|
101 |
/**
|
651 |
obj.setupAdvancedPayments = ( event, $container ) => {
|
652 |
// If this returns false or the card fields aren't visible, see Step #1.
|
653 |
if ( ! paypal.HostedFields.isEligible() ) {
|
654 |
+
// Card fields aren't shown if the merchant isn't eligible.
|
|
|
|
|
655 |
return;
|
656 |
}
|
657 |
|
658 |
+
$container.find( obj.selectors.advancedPayments.container ).removeClass( obj.selectors.hiddenElement.className() );
|
659 |
+
|
660 |
/**
|
661 |
* See references on how to use:
|
662 |
* https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#paypalhostedfields
|
src/views/v2/commerce/gateway/paypal/advanced-payments.php
CHANGED
@@ -10,8 +10,9 @@
|
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
* @since 5.2.0
|
|
|
13 |
*
|
14 |
-
* @version 5.
|
15 |
*
|
16 |
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
17 |
* @var bool $supports_custom_payments [Global] Determines if this site supports custom payments.
|
@@ -25,7 +26,7 @@ if ( $must_login || ! $active_custom_payments ) {
|
|
25 |
?>
|
26 |
|
27 |
<!-- Advanced credit and debit card payments form -->
|
28 |
-
<div class="tribe-tickets__commerce-checkout-paypal-advanced-payments-container">
|
29 |
|
30 |
<?php $this->template( 'gateway/paypal/advanced-payments/separator' ); ?>
|
31 |
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
* @since 5.2.0
|
13 |
+
* @since 5.5.1 Hidden by default and shown using JS.
|
14 |
*
|
15 |
+
* @version 5.5.1
|
16 |
*
|
17 |
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
18 |
* @var bool $supports_custom_payments [Global] Determines if this site supports custom payments.
|
26 |
?>
|
27 |
|
28 |
<!-- Advanced credit and debit card payments form -->
|
29 |
+
<div class="tribe-tickets__commerce-checkout-paypal-advanced-payments-container tribe-common-a11y-hidden">
|
30 |
|
31 |
<?php $this->template( 'gateway/paypal/advanced-payments/separator' ); ?>
|
32 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit3d3c0ab6e205f0d5423c3fbf5d9784d1::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit84364b43d862e67b976d53e359687e7a
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit3d3c0ab6e205f0d5423c3fbf5d9784d1
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit3d3c0ab6e205f0d5423c3fbf5d9784d1', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit3d3c0ab6e205f0d5423c3fbf5d9784d1', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit3d3c0ab6e205f0d5423c3fbf5d9784d1::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -213,9 +213,9 @@ class ComposerStaticInit84364b43d862e67b976d53e359687e7a
|
|
213 |
public static function getInitializer(ClassLoader $loader)
|
214 |
{
|
215 |
return \Closure::bind(function () use ($loader) {
|
216 |
-
$loader->prefixLengthsPsr4 =
|
217 |
-
$loader->prefixDirsPsr4 =
|
218 |
-
$loader->classMap =
|
219 |
|
220 |
}, null, ClassLoader::class);
|
221 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit3d3c0ab6e205f0d5423c3fbf5d9784d1
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
213 |
public static function getInitializer(ClassLoader $loader)
|
214 |
{
|
215 |
return \Closure::bind(function () use ($loader) {
|
216 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit3d3c0ab6e205f0d5423c3fbf5d9784d1::$prefixLengthsPsr4;
|
217 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit3d3c0ab6e205f0d5423c3fbf5d9784d1::$prefixDirsPsr4;
|
218 |
+
$loader->classMap = ComposerStaticInit3d3c0ab6e205f0d5423c3fbf5d9784d1::$classMap;
|
219 |
|
220 |
}, null, ClassLoader::class);
|
221 |
}
|