-
Notifications
You must be signed in to change notification settings - Fork 41
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
Initial purchaser edit modal. #3222
base: bucket/order-management-p2b
Are you sure you want to change the base?
Initial purchaser edit modal. #3222
Conversation
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
phpcs
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis
No space after opening parenthesis is prohibited
if($updated) { |
[phpcs] reported by reviewdog 🐶Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
Expected 1 space after IF keyword; 0 found
if($updated) { |
[phpcs] reported by reviewdog 🐶WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis
No space before closing parenthesis is prohibited
if($updated) { |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 7 tabs, found 3
wp_send_json_success(); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.IncorrectExact
Line indented incorrectly; expected 6 tabs, found 2
} else { |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 7 tabs, found 3
wp_send_json_error("Failed updating purchaser."); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
wp_send_json_error("Failed updating purchaser."); |
[phpcs] reported by reviewdog 🐶Squiz.Strings.DoubleQuoteUsage.NotRequired
String "Failed updating purchaser." does not require double quotes; use single quotes instead
wp_send_json_error("Failed updating purchaser."); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
wp_send_json_error("Failed updating purchaser."); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.IncorrectExact
Line indented incorrectly; expected 6 tabs, found 2
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.IncorrectExact
Line indented incorrectly; expected 3 tabs, found 1
case 'GET': |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 4 tabs, found 2
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
Detected usage of a non-sanitized input variable: $_GET['ID']
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶WordPress.Security.ValidatedSanitizedInput.InputNotValidated
Detected usage of a possibly undefined superglobal array index: $_GET['ID']. Use isset() or empty() to check the index exists before using it
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
$post = get_post($_GET['ID']); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 4 tabs, found 2
$order = tec_tc_get_order( $post ); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 4 tabs, found 2
wp_send_json_success($order->purchaser); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
wp_send_json_success($order->purchaser); |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
wp_send_json_success($order->purchaser); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.IncorrectExact
Line indented incorrectly; expected 2 tabs, found 0
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function render_modal()
public function render_modal($html, $file, $name, $template, $context) { |
[phpcs] reported by reviewdog 🐶Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen
Expected 1 spaces after opening parenthesis; 0 found
public function render_modal($html, $file, $name, $template, $context) { |
[phpcs] reported by reviewdog 🐶Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose
Expected 1 spaces before closing parenthesis; 0 found
public function render_modal($html, $file, $name, $template, $context) { |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
$this->template('edit-purchaser-modal', $context), |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
$this->template('edit-purchaser-modal', $context), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 13 space(s) between "'id'" and double arrow, but found 1.
'id' => 'edit-purchaser-modal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 2 space(s) between "'append_target'" and double arrow, but found 1.
'append_target' => '#edit-purchaser-modal-container', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 1 space(s) between "'button_display'" and double arrow, but found 10.
'button_display' => false, |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 10 space(s) between "'title'" and double arrow, but found 1.
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 4 space(s) between "'close_event'" and double arrow, but found 13.
'close_event' => 'tecTicketsCommerceClosePurchaserModal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 5 space(s) between "'show_event'" and double arrow, but found 14.
'show_event' => 'tecTicketsCommerceOpenPurchaserModal', |
[phpcs] reported by reviewdog 🐶StellarWP.XSS.EscapeOutput.OutputNotEscaped
Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$modal'
echo $modal; |
[phpcs] reported by reviewdog 🐶WordPress.Security.EscapeOutput.OutputNotEscaped
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$modal'.
echo $modal; |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function template()
public function template( $name, $context = [] ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound |
[phpcs] reported by reviewdog 🐶PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
The closing brace for the class must go on the next line after the body
[phpcs] reported by reviewdog 🐶Squiz.PHP.EmbeddedPhp.SpacingBeforeClose
Expected 1 space before closing PHP tag; 0 found
<input type="hidden" value="<?php echo esc_attr( $order->ID );?>" name="ID" /> |
…oad, purchaser modal js is working now.
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
phpcs
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 1 space(s) between "'button_display'" and double arrow, but found 10.
'button_display' => false, |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 10 space(s) between "'title'" and double arrow, but found 1.
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 4 space(s) between "'close_event'" and double arrow, but found 13.
'close_event' => 'tecTicketsCommerceClosePurchaserModal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 5 space(s) between "'show_event'" and double arrow, but found 14.
'show_event' => 'tecTicketsCommerceOpenPurchaserModal', |
[phpcs] reported by reviewdog 🐶StellarWP.XSS.EscapeOutput.OutputNotEscaped
Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$modal'
echo $modal; |
[phpcs] reported by reviewdog 🐶WordPress.Security.EscapeOutput.OutputNotEscaped
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$modal'.
echo $modal; |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function template()
public function template( $name, $context = [] ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
if ( empty( $this->template ) ) { |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
$this->template = new Tribe__Template(); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
$this->template->set_template_origin( Tribe__Tickets__Main::instance() ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.CommentedOutCode.Found
This comment is 64% valid code; is this commented out code?
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 3 tabs, found 2
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
$this->template->set_template_context_extract( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
$this->template->set_template_folder_lookup( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 150 cannot be executed
return $this->template->template( $name, $context, false ); |
[phpcs] reported by reviewdog 🐶PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
The closing brace for the class must go on the next line after the body
[phpcs] reported by reviewdog 🐶Squiz.Commenting.InlineComment.Empty
Blank comments are not allowed
[phpcs] reported by reviewdog 🐶Squiz.PHP.EmbeddedPhp.SpacingBeforeClose
Expected 1 space before closing PHP tag; 0 found
<input type="hidden" value="<?php echo esc_attr( $order->ID );?>" name="ID" /> |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
phpcs
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 4 space(s) between "'close_event'" and double arrow, but found 13.
'close_event' => 'tecTicketsCommerceClosePurchaserModal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 5 space(s) between "'show_event'" and double arrow, but found 14.
'show_event' => 'tecTicketsCommerceOpenPurchaserModal', |
[phpcs] reported by reviewdog 🐶StellarWP.XSS.EscapeOutput.OutputNotEscaped
Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$modal'
echo $modal; |
[phpcs] reported by reviewdog 🐶WordPress.Security.EscapeOutput.OutputNotEscaped
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$modal'.
echo $modal; |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function template()
public function template( $name, $context = [] ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
if ( empty( $this->template ) ) { |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
$this->template = new Tribe__Template(); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
$this->template->set_template_origin( Tribe__Tickets__Main::instance() ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.CommentedOutCode.Found
This comment is 64% valid code; is this commented out code?
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 3 tabs, found 2
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
$this->template->set_template_context_extract( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
$this->template->set_template_folder_lookup( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 146 cannot be executed
return $this->template->template( $name, $context, false ); |
[phpcs] reported by reviewdog 🐶PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
The closing brace for the class must go on the next line after the body
[phpcs] reported by reviewdog 🐶Squiz.Commenting.InlineComment.Empty
Blank comments are not allowed
[phpcs] reported by reviewdog 🐶Squiz.PHP.EmbeddedPhp.SpacingBeforeClose
Expected 1 space before closing PHP tag; 0 found
<input type="hidden" value="<?php echo esc_attr( $order->ID );?>" name="ID" /> |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
phpcs
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
$this->template('src/admin-views/commerce/orders/single/edit-purchaser-modal', $context), |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
$this->template('src/admin-views/commerce/orders/single/edit-purchaser-modal', $context), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 13 space(s) between "'id'" and double arrow, but found 1.
'id' => 'edit-purchaser-modal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 2 space(s) between "'append_target'" and double arrow, but found 1.
'append_target' => '#edit-purchaser-modal-container', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 1 space(s) between "'button_display'" and double arrow, but found 10.
'button_display' => false, |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 10 space(s) between "'title'" and double arrow, but found 1.
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket
Expected 1 spaces before closing parenthesis; 0 found
'title' => esc_html_x( 'Edit purchaser', 'Edit purchaser modal title.', 'event-tickets'), |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 4 space(s) between "'close_event'" and double arrow, but found 13.
'close_event' => 'tecTicketsCommerceClosePurchaserModal', |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 5 space(s) between "'show_event'" and double arrow, but found 14.
'show_event' => 'tecTicketsCommerceOpenPurchaserModal', |
[phpcs] reported by reviewdog 🐶StellarWP.XSS.EscapeOutput.OutputNotEscaped
Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$modal'
echo $modal; |
[phpcs] reported by reviewdog 🐶WordPress.Security.EscapeOutput.OutputNotEscaped
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$modal'.
echo $modal; |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function template()
public function template( $name, $context = [] ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
if ( empty( $this->template ) ) { |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
$this->template = new Tribe__Template(); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
$this->template->set_template_origin( Tribe__Tickets__Main::instance() ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.CommentedOutCode.Found
This comment is 64% valid code; is this commented out code?
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Generic.WhiteSpace.ScopeIndent.Incorrect
Line indented incorrectly; expected at least 3 tabs, found 2
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed
Spaces must be used for mid-line alignment; tabs are not allowed
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.Commenting.InlineComment.SpacingBefore
Expected 1 space before comment text but found 2; use block comment if you need indentation
// $this->template->set_template_folder( 'src/admin-views/commerce/orders/single' ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
$this->template->set_template_context_extract( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
$this->template->set_template_folder_lookup( true ); |
[phpcs] reported by reviewdog 🐶Squiz.PHP.NonExecutableCode.Unreachable
Code after the RETURN statement on line 163 cannot be executed
return $this->template->template( $name, $context, false ); |
[phpcs] reported by reviewdog 🐶PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
The closing brace for the class must go on the next line after the body
[phpcs] reported by reviewdog 🐶WordPress.Arrays.ArrayIndentation.ItemNotAligned
Array item not aligned correctly; expected 16 spaces but found 20
'localize' => [ |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
Array double arrow not aligned correctly; expected 1 space(s) between "'localize'" and double arrow, but found 5.
'localize' => [ |
[phpcs] reported by reviewdog 🐶WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned
Multi-line array item not aligned correctly; expected 20 spaces, but found 24
'name' => 'TicketsEditPurchaserOptions', |
[phpcs] reported by reviewdog 🐶Squiz.PHP.EmbeddedPhp.SpacingBeforeClose
Expected 1 space before closing PHP tag; 0 found
<input type="hidden" value="<?php echo esc_attr( $order->ID );?>" name="ID" /> |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
<button type="button" id="tec-tickets-commerce-edit-purchaser-cancel" class="button button-secondary"><?php echo esc_html_x('Cancel', 'Cancel button.', 'event-tickets' ); ?></button> |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
<button type="submit" id="tec-tickets-commerce-edit-purchaser-save" disabled class="button button-primary"><?php echo esc_html_x('Save', 'Save button.', 'event-tickets' ); ?></button> |
[phpcs] reported by reviewdog 🐶PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket
Expected 1 spaces after opening parenthesis; 0 found
<button type="button" id="tec-tickets-commerce-edit-purchaser-save-and-email" disabled class="button button-primary"><?php echo esc_html_x('Save and send email', 'Save and send email button.', 'event-tickets' ); ?></button> |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
[phpcs] reported by reviewdog 🐶Squiz.Strings.ConcatenationSpacing.PaddingFound
Concat operator must be surrounded by a single space
$name = $order->purchaser['first_name'].' '.$order->purchaser['last_name']; |
…alendar/event-tickets into feat/ET-2164-edit-purchaser
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.
A few suggestions, some nitpicks on using custom props.
Also: can we get at least one snapshot of the HTML output?
|
||
if ( is_user_logged_in() ) { | ||
if ( ( empty( $data['purchaser'] ) || empty( $data['purchaser']['name'] ) ) |
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.
Not sure you need both here TBH - just check empty( $data['purchaser']['name'] )
- it will trigger if $data['purchaser']
is empty
echo $modal; | ||
|
||
return $html; |
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.
why are we echoing and then returning? Append the modal to the HTML and then return?
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.
That HTML will skip the template, it's an override and we want to append.
src/admin-views/commerce/orders/single/edit-purchaser-modal.php
Outdated
Show resolved
Hide resolved
src/resources/postcss/tickets-commerce/admin/orders/single.pcss
Outdated
Show resolved
Hide resolved
src/resources/postcss/tickets-commerce/admin/orders/single.pcss
Outdated
Show resolved
Hide resolved
src/resources/postcss/tickets-commerce/admin/orders/single.pcss
Outdated
Show resolved
Hide resolved
src/resources/postcss/tickets-commerce/admin/orders/single.pcss
Outdated
Show resolved
Hide resolved
src/resources/postcss/tickets-commerce/admin/orders/single.pcss
Outdated
Show resolved
Hide resolved
composer.json
Outdated
@@ -43,7 +43,34 @@ | |||
"dealerdirect/phpcodesniffer-composer-installer": true | |||
} | |||
}, | |||
"scripts": { | |||
"strauss": [ | |||
"test -f ./bin/strauss.phar || curl -o bin/strauss.phar -L -C - https://github.com/BrianHenryIE/strauss/releases/download/0.13.0/strauss.phar", |
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.
Update the version of Strauss here, to version 19.X
// phpcs:ignore StellarWP.XSS.EscapeOutput.OutputNotEscaped, WordPress.Security.EscapeOutput.OutputNotEscaped | ||
echo $modal; | ||
|
||
// Always return $html - we are not overriding the template, simply "appending" our modal. | ||
return $html; |
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.
A couple of more questions about this (sorry):
- Since we're filtering a template, what happens when the template is set to be returned and not rendered (echoed)?
- Wouldn't appending be
return $html . $modal;
?
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 filter is an override. If I return ANY result it will short-circuit the template being loaded. So in order to "append" I output directly, and leave the $html
var alone so it continues rendering the template.
right: 0; | ||
top: 0; | ||
width: 100%; | ||
z-index: var(--tec-z-index-spinner-container); |
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.
❤️
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.
Looks good to me - but Mike has a question.
🎫 Ticket
ET-2164
🗒️ Description
Edit purchaser modal.
🎥 Artifacts
✔️ Checklist
npm run changelog
to add changelog file(s). More info herewpunit
orintegration
tests.wpunit
orintegration
tests.