(Pro 1.3.3) Add To Calendar links missing and console error 'Alpine Expression Error: piecalVarsPro is not defined'

On some WordPress sites, the way Pie Calendar enqueues scripts and localizes data for them can break. It's not yet understood why some sites have this issue while others do not, but in the interim we've identified a simple code snippet fix you can apply to your site to correct the problem.

To fix this issue, use your favorite code snippets plugin and add this code, set to run everywhere:

add_action( 'wp_enqueue_scripts', 'piecal_missing_vars_fix' );

function piecal_missing_vars_fix() {
	wp_localize_script( 'piecal-utils-pro', 'piecalVarsPro', [
		'enabledProviders' => get_option('piecal_add_to_calendar_checkboxes')
	] );
}

This fix applies only to Pie Calendar Pro 1.3.3. If you encounter a similar case that is not resolved by using this snippet, please contact us at support@piecalendar.com and we will be glad to assist.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.