Changeset 2625605
- Timestamp:
- 11/07/2021 12:07:50 PM (4 years ago)
- Location:
- devllo-events-bookings/trunk
- Files:
-
- 7 edited
-
devllo-events-bookings.php (modified) (2 diffs)
-
inc/devllo-events-bookings-activator.php (modified) (1 diff)
-
inc/devllo-events-bookings-email-function.php (modified) (4 diffs)
-
inc/devllo-events-bookings-form.php (modified) (4 diffs)
-
inc/devllo-events-bookings-functions.php (modified) (7 diffs)
-
payments/payments.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
devllo-events-bookings/trunk/devllo-events-bookings.php
r2512686 r2625605 5 5 Description: This plugin adds a ticketing function to the Devllo Events plugin 6 6 Author: Devllo Plugins 7 Version: 0. 17 Version: 0.2 8 8 Author URI: https://devllo.com/ 9 9 Text Domain: devllo-events-bookings … … 21 21 * Current plugin version. 22 22 */ 23 define( 'DEVLLO_EVENTS_BOOKINGS_VERSION', '0. 1' );23 define( 'DEVLLO_EVENTS_BOOKINGS_VERSION', '0.2' ); 24 24 define( 'DEVLLO_EVENTS_BOOKINGS_URI', plugin_dir_url( __FILE__ ) ); 25 25 define( 'DEVLLO_EVENTS_BOOKINGS_DIR', dirname(__FILE__) ); -
devllo-events-bookings/trunk/inc/devllo-events-bookings-activator.php
r2512686 r2625605 14 14 add_option( 'Activated_Plugin', 'devllo-event-bookings' ); 15 15 16 $devllo_events_bookings_current_version = 0. 1;16 $devllo_events_bookings_current_version = 0.2; 17 17 18 18 } -
devllo-events-bookings/trunk/inc/devllo-events-bookings-email-function.php
r2512686 r2625605 9 9 add_action('devllo_events_bookings_after_add_attendee', array($this, 'devllo_send_organiser_email_after_checkout')); 10 10 add_action('devllo_events_bookings_after_add_attendee', array($this, 'devllo_send_email_after_checkout')); 11 add_filter('wp_mail_content_type', array($this, 'devllo_events_format_email')); 11 12 } 12 13 … … 34 35 35 36 wp_mail( $to, $subject, $message ); 36 37 37 38 } 38 39 … … 113 114 } 114 115 115 // $message .= '<br/><br/>Your details: ';116 117 116 $message .= '<br/><br/>Please submit any questions to ' .$organiser_email; 118 117 … … 120 119 121 120 } 121 122 // Format Emails 123 function devllo_events_format_email(){ 124 return 'text/html'; 125 } 122 126 } 123 127 -
devllo-events-bookings/trunk/inc/devllo-events-bookings-form.php
r2512686 r2625605 4 4 5 5 public function __construct(){ 6 add_shortcode( 'devllo _register', array($this, 'devllo_events_bookings_form'));6 add_shortcode( 'devllo-register', array($this, 'devllo_events_bookings_form')); 7 7 add_action( 'init', array( $this, 'devllo_events_add_new_user' ) ); 8 8 } … … 17 17 // $bookings_enabled = get_option('users_can_register'); 18 18 19 if ( ! get_option( 'users_can_register' ) ) {20 update_option( 'users_can_register', true );21 }22 19 23 $output = $this->devllo_events_bookings_fields();20 $output = $this->devllo_events_bookings_fields(); 24 21 25 22 return $output; … … 152 149 wp_set_auth_cookie($user_login, $user_pass, true); 153 150 wp_set_current_user($new_user_id, $user_login); 154 do_action('wp_login', $user_login); 155 151 // do_action('wp_login', $user_login); 156 152 157 153 $creds = array(); … … 163 159 164 160 // send the newly created user to the home page after logging them in 165 update_option( 'users_can_register', false );166 161 167 162 wp_redirect(home_url('/events')); exit; -
devllo-events-bookings/trunk/inc/devllo-events-bookings-functions.php
r2512686 r2625605 13 13 add_action ('devllo_events_after_side_single_event', array($this, 'devllo_events_reg_login_func')); 14 14 15 add_action ('wp_head', array($this, ' checkoutstartSession'), 1);15 add_action ('wp_head', array($this, 'devllo_events_reg_checkoutstartSession'), 1); 16 16 17 17 // add_action ('devllo_events_after_side_single_event', array($this, 'devllo_events_reg_login_button')); … … 24 24 25 25 // Start Checkout Session 26 function checkoutstartSession() {26 function devllo_events_reg_checkoutstartSession() { 27 27 28 28 global $post; 29 if( !is_object($post) ) 30 return; 29 31 if ( 'devllo_event' === $post->post_type ) { 30 32 … … 97 99 } 98 100 99 // Check if U Ser is Registered, if not let them Register101 // Check if User is Registered, if not let them Register 100 102 function devllo_events_reg_user(){ 101 103 global $post; … … 105 107 106 108 echo do_shortcode( '[reg_login]' ); 107 _e('You need to Log in/Register as an attendee to attend this event', ' ');109 _e('You need to Log in/Register as an attendee to attend this event', 'devllo-events-bookings'); 108 110 109 111 } … … 175 177 if ($payment_gateway == "pbc"){ 176 178 $url = get_permalink(get_option('devllo-event-checkout-page')); 177 // $url = get_site_url() . "/1526-2/";178 179 179 wp_redirect( $url ); 180 180 } … … 216 216 ); 217 217 218 $table_name = $wpdb->prefix . 'devllo_events_participants'; 219 220 $wpdb->insert( 221 $table_name, 222 array( 223 'time' => current_time( 'mysql' ), 224 'name' => $user->user_login, 225 'user_email' => $user->user_email, 226 'user_id' => $user->ID, 227 'event_id' => $postID, 228 //'text' => $welcome_text, 229 ) 230 ); 218 // Check if user is already registered 219 if ( $id > 0 ) 220 { 221 echo 'You are already registered for this event'; 222 } else 223 { 224 $table_name = $wpdb->prefix . 'devllo_events_participants'; 225 226 $wpdb->insert( 227 $table_name, 228 array( 229 'time' => current_time( 'mysql' ), 230 'name' => $user->user_login, 231 'user_email' => $user->user_email, 232 'user_id' => $user->ID, 233 'event_id' => $postID, 234 //'text' => $welcome_text, 235 ) 236 ); 231 237 232 238 echo '<br/>You are Registered, you will be attending this event'; 233 239 234 240 do_action('devllo_events_bookings_after_add_attendee'); 241 } 235 242 236 243 } … … 261 268 ); 262 269 263 $table_name = $wpdb->prefix . 'devllo_events_participants'; 264 265 $wpdb->insert( 266 $table_name, 267 array( 268 'time' => current_time( 'mysql' ), 269 'name' => $user->user_login, 270 'user_email' => $user->user_email, 271 'user_id' => $user->ID, 272 'event_id' => $postID, 273 //'text' => $welcome_text, 274 ) 275 ); 276 277 echo '<br/>You are Registered, you will be attending this event'; 278 279 do_action('devllo_events_bookings_after_add_attendee'); 280 270 // Check if user is already registered 271 if ( $id > 0 ) 272 { 273 echo 'You are already registered for this event'; 274 } else 275 { 276 277 $table_name = $wpdb->prefix . 'devllo_events_participants'; 278 279 $wpdb->insert( 280 $table_name, 281 array( 282 'time' => current_time( 'mysql' ), 283 'name' => $user->user_login, 284 'user_email' => $user->user_email, 285 'user_id' => $user->ID, 286 'event_id' => $postID, 287 //'text' => $welcome_text, 288 ) 289 ); 290 291 echo '<br/>You are Registered, you will be attending this event'; 292 293 do_action('devllo_events_bookings_after_add_attendee'); 294 } 281 295 } 282 296 -
devllo-events-bookings/trunk/payments/payments.php
r2512686 r2625605 1 1 <?php 2 function devllo_events_ stripe_payment_form() {2 function devllo_events_payment_form() { 3 3 4 4 ob_start(); … … 22 22 } 23 23 24 ?></div><br/><button class="btn btn-primary" type="submit" id="submit"><?php _e('Accept', 'devllo-events-registration'); ?></button> 24 ?></div> 25 <br/> 26 <button class="btn btn-primary" type="submit" id="submit"><?php _e('Accept', 'devllo-events-registration'); ?></button> 25 27 </form> 26 28 <?php 27 29 if($_SERVER['REQUEST_METHOD']=='POST'){ 28 30 29 echo "You will be redirected to the event page.<br/>"; 30 31 $Devllo_Events_Bookings_Functions = new Devllo_Events_Bookings_Functions; 32 33 $Devllo_Events_Bookings_Functions->devllo_events_add_attendee(); 31 _e('You will be redirected to the event page.', 'devllo-events-bookings'); ?> 32 <br/> 33 <?php 34 35 $Devllo_Events_Bookings_Functions = new Devllo_Events_Bookings_Functions; 36 37 $Devllo_Events_Bookings_Functions->devllo_events_add_attendee(); 38 39 echo '<script type="text/javascript"> 40 setTimeout(function(){ 41 window.location.href = "'. get_permalink( $value ) .'" 42 }, 5000); 43 console.log('.$value.') 44 </script>'; 45 } 34 46 35 ?> 36 <script> 37 setTimeout(function(){ 38 window.location.href = '<?php get_permalink( $value ); ?>'; 39 }, 5000); 40 </script> 41 <?php 42 } 43 44 }else{ 45 do_action('devllo_events_bookings_payment_checkout'); 46 } 47 47 } 48 else{ 49 do_action('devllo_events_bookings_payment_checkout'); 50 } 48 51 49 52 } … … 52 55 53 56 { 54 echo 'Please select an event to check out';57 _e('Please select an event to check out', 'devllo-events-bookings'); 55 58 } 56 59 return ob_get_clean(); 57 60 58 61 } 59 add_shortcode('devllo-checkout', 'devllo_events_ stripe_payment_form');62 add_shortcode('devllo-checkout', 'devllo_events_payment_form'); -
devllo-events-bookings/trunk/readme.txt
r2512687 r2625605 5 5 Tested up to: 5.7 6 6 Requires PHP: 5.5 7 Stable tag: 0. 17 Stable tag: 0.2 8 8 License: GPLv2 or later 9 9 … … 11 11 12 12 == Description == 13 Allow attendees to register to events. Sell tickets with integrated payment gateway or redirect to an offsite ticket pa ge.13 Allow attendees to register to events. Sell tickets with integrated payment gateway or redirect to an offsite ticket pahe. 14 14 15 15 … … 37 37 = 0.1 = 38 38 Initial release. 39 40 = 0.2 = 41 Fixed Redirect after checkout. 42 Fixed HTML tags in emails 43 Fixed duplicate event bookings 44 Fixed bug on register page 45 Fixed devllo-register shortcode error
Note: See TracChangeset
for help on using the changeset viewer.