This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Register the action for the Edit order screen. | |
add_filter( 'woocommerce_order_actions', 'tec_event_tickets_plus_wc_register_force_regenerate_attendees' ); | |
// Register the bulk action for the Orders screen. | |
add_filter( 'bulk_actions-edit-shop_order', 'tec_event_tickets_plus_wc_register_force_regenerate_attendees' ); | |
/** | |
* Register the custom action to the list of order actions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_order_status_changed', 'rt_ct_reset_failed_payouts', 9, 4 ); | |
function rt_ct_reset_failed_payouts( $order_id, $status_from, $status_to, $order ) { | |
if ( 'completed' === $status_to ) { | |
$payouts = tribe_payouts(); | |
// Get payouts by Order ID. | |
$payouts->by( 'order', $order_id ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_order_status_changed', 'rt_ct_reset_failed_payouts', 9, 4 ); | |
function rt_ct_reset_failed_payouts( $order_id, $status_from, $status_to, $order ) { | |
global $wpdb; | |
if ( 'completed' == $status_to ) { | |
$query = $wpdb->query( "UPDATE $wpdb->posts SET post_status = 'tribe-payout-pending' WHERE post_status = 'tribe-payout-failed'" ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void 0===window.tribe&&(window.tribe={}),void 0===window.tribe.tickets&&(window.tribe.tickets={}),window.tribe.tickets.registration={},function(t,e){e.document=t(document),e.hasChanges={},e.selector={footerQuantity:".tribe-tickets__footer__quantity__number",footerAmount:".tribe-tickets__footer__total .tribe-amount",checkout:".tribe-tickets__registration__checkout",checkoutButton:".tribe-tickets__item__registration__submit",container:".tribe-tickets__registration",eventContainer:".tribe-tickets__registration__event",field:{text:".tribe-tickets__item__attendee__field__text",checkbox:".tribe-tickets__item__attendee__field__checkbox",select:".tribe-tickets__item__attendee__field__select",radio:".tribe-tickets__item__attendee__field__radio"},fields:".tribe-tickets__item__attendee__fields",fieldsError:".tribe-tickets__item__attendee__fields__error",fieldsErrorAjax:".tribe-tickets__item__attendee__fields__error--ajax",fieldsErrorRequired:".tribe-tickets__item__attendee__fields__error--required",fieldsSuccess:".tribe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add action to the "order actions" dropdown | |
add_filter( 'woocommerce_order_actions', function( $actions ) { | |
$actions['tribe_force_regenerate_ticket'] = __( 'Regenerate Attendees' ); | |
return $actions; | |
}); | |
// Execute action when selected from order actions dropdown | |
add_action( 'woocommerce_order_action_tribe_force_regenerate_ticket', function( $order ) { |