Support

Home Forums Event Espresso Premium Changed "Goes on Sale" text filter function code creates white screen

Changed "Goes on Sale" text filter function code creates white screen

Posted: June 21, 2018 at 5:38 am


cadragon

June 21, 2018 at 5:38 am

Hello — I followed your instructions in this post https://eventespresso.com/topic/change-goes-on-sale-text/ and added the filter function to my functions.php file. I uploaded the file into my child theme folder and my website turned to a white screen.

Here is a copy of my functions.php file:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );

// Additional Functions
// =============================================================================

add_filter( 
  'FHEE__ticket_selector_chart_template__table_header_qty',
  function(){ return 'Select'; }
);

add_filter(
  'FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg',
  'your_custom_goes_on_sale_text_function_name'
);
function your_custom_goes_on_sale_text_function_name() {
  return 'Full Price Begins';
}

Would appreciate your help. Thank you!


Tony

  • Support Staff

June 21, 2018 at 5:54 am

Hi there,

If you add this snippet to your wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

Then retest your code, the whitescreen should add a log entry to /wp-content/debug.log.

What error is shown there?

Note, I’ve just test the bottom functions you posted and didn’t have any issues so thats why we need the error itself.


cadragon

June 21, 2018 at 6:10 am

Thank you for your prompt response! I added the code to the wp-config.php then uploaded the functions.php file and it now works! I didn’t receive an error message, just a white screen.

Should I remove the code from the wp-config.php file or keep it as is?

Appreciate your help, thank you!


Tony

  • Support Staff

June 21, 2018 at 6:16 am

A white screen means a fatal error was thrown but your server is (correctly) setup to not show the errors. The wpdebug snippet tells your server to log the errors so we can view them.

As it’s working you want to remove that code from wp-config.php again, otherwise it’ll just continue to log any notice/warning/error on the site and get rather large.


cadragon

June 21, 2018 at 6:39 am

Got it. Will do. Many thanks!

The support post ‘Changed "Goes on Sale" text filter function code creates white screen’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso