Title: Greg McEwan-Marriott's Replies | WordPress.org

---

# Greg McEwan-Marriott

  [  ](https://wordpress.org/support/users/gregthebuzz/)

 *   [Profile](https://wordpress.org/support/users/gregthebuzz/)
 *   [Topics Started](https://wordpress.org/support/users/gregthebuzz/topics/)
 *   [Replies Created](https://wordpress.org/support/users/gregthebuzz/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/gregthebuzz/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/gregthebuzz/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/gregthebuzz/engagements/)
 *   [Favorites](https://wordpress.org/support/users/gregthebuzz/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/users/gregthebuzz/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/gregthebuzz/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YMC Filter] Filters are gone after Last update](https://wordpress.org/support/topic/filters-are-gone-after-last-update/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [10 months ago](https://wordpress.org/support/topic/filters-are-gone-after-last-update/#post-18626674)
 * OK i managed to fix it by removing a missing term in ymc_cpt_value (postmeta)
   BUT still unsure if i should run the update
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Portfolio Filter Gallery - Photo Gallery] Image Order not working](https://wordpress.org/support/topic/image-order-not-working/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/image-order-not-working/#post-18121070)
 * YES !!!!!!!!!!!! That worked !!!!!!!!! You see plugin devs – with support like
   that means I will go buy the PRO version of this plugin
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] Re-Issue new ticket code when changing attendees](https://wordpress.org/support/topic/re-issue-new-ticket-code-when-changing-attendees/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/re-issue-new-ticket-code-when-changing-attendees/#post-18116460)
 *  was asked to improve the chances of ticket pass fraud from people buying tickets
   with Event Tickets Plus (The Events Calendar WordPress plugin). When someone 
   buys say 2 passes to an event they get issued two PDF passes emailed to the the
   two attendees they added to the event… The purchaser can then go update the Attendee
   information afterwards e.g. Ticket Holder Name and Email address.
 * The worry was that
    1. The new Attendee may not be a woocommerce customer/WP user and
    2. what stops the purchaser from “re-selling” fake passes by continually going 
       to update his two ticket attendees, each getting sent a PDF ticket and when 
       they get to the event the first to check in would get in BUT the rest would 
       not be able to be scanned it via the QRcode scanner and security code attached
       in the ticket pass…
 * OK, so I decided to use css to hide the built in Update Attendee Information 
   in the plugin and then using ACF built a form that contains 3 fields
    1. The Current Ticket ID
    2. a new ticket_holder (name) field
    3. a new ticket_email_to (email) field
 * The form runs a hook called transfer_ticket on update that runs the following
   function (excuse my bad coding but it works)
 *     ```wp-block-code
           add_action('acf/save_post', 'transfer_ticket');     function transfer_ticket( $post_id ) {        global $wpdb;        global $post;        global $user;                $pid = intval($_GET["tid"]);        $ticket_holder = get_post_meta($post_id, 'ticket_holder',true);        $ticket_email_to = get_post_meta($post_id, 'ticket_email_to',true);        $_unique_id = get_post_meta($post_id, '_unique_id',true);                $_tribe_wooticket_event = get_post_meta($post_id, '_tribe_wooticket_event',true);        $_tribe_wooticket_order = get_post_meta($post_id, '_tribe_wooticket_order',true);        $_tribe_wooticket_product = get_post_meta($post_id, '_tribe_wooticket_product',true);                $lastDelimiterPos = strrpos($_unique_id, '-');        $lastpart = substr($_unique_id, $lastDelimiterPos + 1);                //update_post_meta($post_id, '_tribe_tickets_full_name', $ticket_holder);        //update_post_meta($post_id, '_tribe_tickets_email', $ticket_email_to);                     // First, make sure the email address is set        if ( isset( $ticket_email_to ) && ! empty( $ticket_email_to ) ) {            // Next, sanitize the data            $email_addr = trim( strip_tags( stripslashes( $ticket_email_to ) ) );            $exists = email_exists($email_addr);                        if ( !$exists) {                                $xname = trim($ticket_holder);                                  $last_name = (strpos($xname, ' ') === false) ? '' : preg_replace('#.*\s([\w-]*)$#', '$1', $xname);                $first_name = trim( preg_replace('#'.preg_quote($last_name,'#').'#', '', $xname ) );                $args = array('first_name' => $first_name, 'last_name' => $last_name);                  $newid ='';                $length = 6 ;                $batch = array_merge( range( '0', '9' ), range( 'A', 'Z' ) );                shuffle( $batch );                $id = '';                $keys = array_rand( $batch, $length );                                foreach ( $keys as $index ) {                                        $newid .= $batch[ $index ];                                    }                                $n_unique_id = str_replace($lastpart,$newid , $_unique_id);                update_post_meta($post_id, 'last_name', $last_name); // for testing                update_post_meta($post_id, 'first_name', $first_name); // for testing                update_post_meta($post_id, 'newid', $newid); // for testing                 update_post_meta($post_id, 'lastpart', $n_unique_id); // for testing                                                                    $username = sanitize_title( $ticket_holder );                     $user_login = wp_slash( $username );                $user_email = wp_slash( $email_addr );                $user_pass  = wp_generate_password( 6, false );;                $userdata = compact( 'user_login', 'user_email', 'user_pass' );                                // Create the new user                $new_user_id = wp_create_user( $user_login, $user_pass, $user_email );                                            // Get current user object                $user = get_user_by( 'id', $new_user_id );                // Remove role                $user->remove_role( 'subscriber' );                // Add role                $user->add_role( 'customer' );                                      wp_update_user( array( 'ID' => $user->ID, 'display_name' => sanitize_text_field($xname) ) );                    update_user_meta($user->ID, 'first_name', $first_name);                update_user_meta($user->ID, 'last_name', $last_name);                                $nsecurity_code = substr( md5( wp_rand() . '_' . $user->ID ), 0, 10 );                update_post_meta($post_id, '_tribe_wooticket_security_code', $nsecurity_code);                update_post_meta($post_id, '_unique_id', $n_unique_id);                update_post_meta($post_id, '_tribe_tickets_email', $user_email);                update_post_meta($post_id, '_tribe_tickets_full_name', $xname);                update_post_meta($post_id, '_tribe_tickets_attendee_user_id', $new_user_id);                                    echo "<script type='text/javascript'>alert('Ticket has been transferred !!!');</script>";                          } else {                //echo '</br> User exists';            }                        header("Location: https://somewebsite.com/my-dashboard/bookings/");            die();              }                }   
       ```
   
 *     ```wp-block-code
       //
       ```
   
 * In essence and I have tested this the following happens
    1. It creates a new WP user with a customer role ‘Customer’ if user email does 
       not exists in WP
    2. It updates the existing ticket meta with the new users email and names and the
       ticket _tribe_tickets_attendee_user_id with the new WP user
    3. It recreates the ticket’s security code (used in the QR)
    4. It recreates the ticket’s _unique_id that is essential to check in successfully
 * So the new user can now log in and see his ticket and add it to his Google or
   iphone Wallet or download his pdf ticket. I have tested with the mobile app and
   the new issued ticket checks in 100% fine using the QR scanner
 * **NOW THE ISSUE IS**
 * I an trying to get the function above to somehow hook into The Events Calendar
   Ticket plugin to automatically send the new user his PDF ticket !!! AND i cannot
   seem to figure it out. I have the ticket ID and the Event ID and the user ID 
   and details, but how do i resend the ticket?
 * Is there a hook I can call?
 * I looked through the code in the plugin and only thing that closely resembles
   a hook or function i can call is situated in wp-content/plugins/event-tickets-
   plus/src/Tickets_Plus/Commerce/Attendee_Registration/Hooks.php
 * lines 171-182
 *     ```wp-block-code
       public function update_attendee_meta_my_tickets_page( $attendee_id, $data_to_save, $data, $order_id, $ticket_id, $post_id, $provider ) {        $args = [            'fields' => $data,        ];        $ticket = tribe( Commerce\Ticket::class )->get_ticket( $ticket_id );        // Always inject IAC after Fields.        $args = $this->container->make( Attendee::class )->inject_individual_collection_args( $args, $ticket );        $attendee = tec_tc_attendees()->by( 'id', $attendee_id )->set_args( $args )->save();    }`
       ```
   
 * Anybody able to help me find a way to resend the ticket as a PDF?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] Re-Issue new ticket code when changing attendees](https://wordpress.org/support/topic/re-issue-new-ticket-code-when-changing-attendees/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/re-issue-new-ticket-code-when-changing-attendees/#post-18095738)
 * a better solution?
 * User A buys ticket no 500
   User A sells ticket no 500 to another person by
    1. Transfer ticket to Person B – supplies name, tel, email – the system sends the
       sec code on old ticket to Person B
    2. Message gets sent to Person B – to register account – becomes User B
    3. User B gets list of pending transfer tickets – from his account
    4. User B pays decibel for ticket by entering sec code and completes payment
    5. On payment funds get transferred into User A wallet
    6. System replaces original ticket with User B details and issues new ticket to
       User B
    7. User A can then request refund if required
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoco Payments] Payment status does not update](https://wordpress.org/support/topic/payment-status-does-not-update-2/)
 *  [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/payment-status-does-not-update-2/#post-17997562)
 * I have the same issue – where do i get the fix as described above?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Notification Bell] Sound on Notification](https://wordpress.org/support/topic/sound-on-notification/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/sound-on-notification/#post-15431218)
 * Thank you for assisting !!!! I most def will get Premium Version if that is the
   case… Just wanted to see it working
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CBX Changelog & Release Note] Re-Ordering Changelog](https://wordpress.org/support/topic/re-ordering-changelog/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/re-ordering-changelog/#post-14757455)
 * [@manchumahara](https://wordpress.org/support/users/manchumahara/) no it was 
   a quickfix… it does not allow you to reorder the blocks in backend… just filters
   the frontend output by date…. It would be nice to be able to add a “new release”
   and then drag it down the previous blocks…. especially when you creating a new
   changelist or migrating an old changelog or where you have multiple devs adding
   changes… date is always the common denominator
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CBX Changelog & Release Note] Re-Ordering Changelog](https://wordpress.org/support/topic/re-ordering-changelog/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/re-ordering-changelog/#post-14684629)
 * ok managed to “hack it” by adding
 * `array_multisort(array_column($valid_values, 'date'), SORT_DESC, $valid_values);`
 * after line 426 in class-cbxchangelog-admin.php
    -  This reply was modified 4 years, 11 months ago by [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BuddyPress Xprofile Custom Field Types] Returns term ID not value in frontend](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/#post-12685742)
 * only Custom Post Type UI and Advanced Custom Fields
 * 1 field is Custom Post Type Multi Selector
    2nd is Custom Taxonomy MultiSelector
   3rd is Custom Taxonomy Selector
 * no links set
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BuddyPress Xprofile Custom Field Types] Returns term ID not value in frontend](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/#post-12685696)
 * ok done that
 * Youzer off
    edit profile in admin – saved new choices also added new custom taxo
   select and saved that to profile group
 * still same
 * [https://combat360.online/members/maddogmcewan/profile/](https://combat360.online/members/maddogmcewan/profile/)
 * make u admin?
    -  This reply was modified 6 years, 2 months ago by [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BuddyPress Xprofile Custom Field Types] Returns term ID not value in frontend](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/#post-12685610)
 * tried that 🙁 i will unplug for 30 minutes youzer – and u can look – still only
   values – this is weird
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BuddyPress Xprofile Custom Field Types] Returns term ID not value in frontend](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/returns-term-id-not-value-in-frontend/#post-12685575)
 * appreciate response Brajesh… yup this is whats confusing me too…
 * [https://combat360.online/members/maddogmcewan/info/](https://combat360.online/members/maddogmcewan/info/)
 * u will see it has term id’s
 * [https://combat360.online/wp-content/uploads/2018/08/greg1.jpg](https://combat360.online/wp-content/uploads/2018/08/greg1.jpg)
 * shows fields in profile fields
 * not sure whats going on
 * BuddyPress Xprofile Custom Field Types
    Have all the extra field types at your
   disposal.
 * Version 1.1.5 |
    -  This reply was modified 6 years, 2 months ago by [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Switch User] IDEA! Facebook styles account switching](https://wordpress.org/support/topic/idea-facebook-styles-account-switching/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/idea-facebook-styles-account-switching/#post-11260599)
 * ![](https://i0.wp.com/gregs.life/wp-content/uploads/2018/12/switch.jpg?ssl=1)
 * Tried sending you a zip file of updated plugin to work with the the multiple 
   user accounts plugin [https://wordpress.org/plugins/allow-multiple-accounts/](https://wordpress.org/plugins/allow-multiple-accounts/)
 * So basically this becomes an Account Switcher (as in facebook) allowing users
   to switch between accounts they have on your blog
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Switch User] IDEA! Facebook styles account switching](https://wordpress.org/support/topic/idea-facebook-styles-account-switching/)
 *  Thread Starter [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/idea-facebook-styles-account-switching/#post-11255102)
 * [@mariovalney](https://wordpress.org/support/users/mariovalney/) awesome… getting
   it now… btw this is what i added to make it work with the multiple user accounts
   plugin [https://wordpress.org/plugins/allow-multiple-accounts/](https://wordpress.org/plugins/allow-multiple-accounts/)
 * in /wp-content/plugins/switch-user/modules/frontend/class-switch-user-frontend.
   php i replaced `public function render_html()` on line 156 with
 *     ```
       		public function render_html() {
   
       			if ( $this->check_can_render() ) {
   
       				$users = get_users( array(
       					'order_by' => 'login',
       				) );
   
       				if ( ! empty( $users ) ) : ?>
   
       					<div id="su-wrapper">
       						<span class="su-wrapper-toggle">
       						<img src="https://gregs.life/wp-content/uploads/2018/12/switch_557552.png" style="width:32px;position: relative;top: -4px;" title="<?php _e( 'Switch Account', SWITCH_USER_TEXTDOMAIN ) ?>">
       						</span>
       						<h1><?php _e( 'Switch Account:', SWITCH_USER_TEXTDOMAIN ) ?></h1>
       						<hr>
       						<ul>
       							<?php
       								$current_user_id = get_current_user_id();
       								$current_user = wp_get_current_user();
       								$haslist = c2c_get_users_by_email( $current_user->user_email);
   
       								foreach ( $haslist as $user ) {
       								    if ( $user->ID == $current_user_id ) {
       								        echo '<li class="current-user" data-user-id="' . $user->ID . '" title="' . __( "You are logged as this user", SWITCH_USER_TEXTDOMAIN ) . '">' . $user->user_login . '</li>';
       								    } else {
       								        echo '<li class="js-su-user" data-user-id="' . $user->ID . '" title="' . __( "Click to login as this user", SWITCH_USER_TEXTDOMAIN ) . '">' . $user->user_login . '</li>';
       								    }
       								}
       							?>
       						</ul>
       						<?php wp_nonce_field( SWITCH_USER_CHANGE_USER_NONCE, 'su-change-user-security' ); ?>
       					</div>
   
       				<?php endif;
       			}
   
       		}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MediaPress] tag some friend in photo](https://wordpress.org/support/topic/tag-some-friend-in-photo/)
 *  [Greg McEwan-Marriott](https://wordpress.org/support/users/gregthebuzz/)
 * (@gregthebuzz)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/tag-some-friend-in-photo/#post-11249630)
 * [http://www.amkd.com.au/wordpress/bp-gallery-plugin/98](http://www.amkd.com.au/wordpress/bp-gallery-plugin/98)
 * Caevan is a nice guy – he got this working pretty well and I am sure he would
   happily if asked help intergrate this with MediaPress

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/users/gregthebuzz/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/gregthebuzz/replies/page/2/?output_format=md)