-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SL-38] Feat - Show attendee seat data on attendee report page. #3054
Conversation
|
||
return $seat_label; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog πΆPSR2.Files.EndFileNewline.NoneFound
Expected 1 newline at end of file; 0 found
$layout_id = get_post_meta( $event_id, Meta::META_KEY_LAYOUT_ID, true ); | ||
update_post_meta( $attendee->ID, Meta::META_KEY_LAYOUT_ID, $layout_id ); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog πΆPSR2.Files.EndFileNewline.TooMany
Expected 1 blank line at end of file; 2 found
public function render_seat_column( $value, $item, $column ) { | ||
return $this->attendee->render_seat_column( $value, $item, $column ); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog πΆPSR2.Files.EndFileNewline.TooMany
Expected 1 blank line at end of file; 2 found
* @package TEC/Tickets/Seating/Orders | ||
*/ | ||
class Controller extends Controller_Contract { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this blank space at the beginning, why?!
* @return void | ||
*/ | ||
protected function do_register(): void { | ||
// Todo: This is only handling seating info for TicketsCommerce for now, in future we have to include other actions for other providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other commerce providers will be in ET+, though, right? I think this TODO can be removed from here.
public function add_attendee_seat_column( array $columns, int $event_id ): array { | ||
$event_layout_id = get_post_meta( $event_id, Meta::META_KEY_LAYOUT_ID, true ); | ||
|
||
if ( empty( $event_layout_id ) && ! tribe( Attendees_Page::class )->is_on_page() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check on the current request being on the Attendee_Page
is very late.
If we're not on the Attendee Page, by the time this bailed out, a number of queries and controller routing did happen.
I would move this check on this being the Attendee Page or not in the Controller and, there, hook this callback only if required.
Did you try that? Did it not work?
add_action( 'tec_tickets_commerce_flag_action_generated_attendee', [ $this, 'save_seat_data_for_attendee' ], 10, 7 ); | ||
|
||
// Add attendee seat data column to the attendee list. | ||
add_filter( 'tribe_tickets_attendee_table_columns', [ $this, 'add_attendee_seat_column' ], 10, 2 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As proposed in the Attendee
class of this same namespace, I would be curious to know if we could hook these only in the context of the Attendees page.
|
||
namespace TEC\Tickets\Seating\Orders; | ||
|
||
use Illuminate\Support\Str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog πΆSlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse
Type Illuminate\Support\Str is not used in this file.
π« Ticket
SL-38
ποΈ Description
Unassigned
.π₯ Artifacts
π₯ screencast(s): https://www.loom.com/share/17940e6d91ee45a3a82bb72d9f740272
Update 2: https://www.loom.com/share/7b5575199bab42ca983ad2139799aece
βοΈ Checklist
readme.txt
file.wpunit
orintegration
tests.wpunit
orintegration
tests.