The constructor for `WP_Customize_Widgets` has this bit of code before it does the `add_action()` and `add_filter()` calls: ``` php // Skip useless hooks when the user can't manage widgets anyway. if ( ! current_user_can( 'edit_theme_options' ) ) { return; } ``` This will cause a problem for previewing widgets on the frontend for unauthenticated users because these filters/actions aren't getting added: https://github.com/xwp/wordpress-develop/blob/885d38edc8de04c3cf7baced5ef0effc8c5a6bd6/src/wp-includes/class-wp-customize-widgets.php#L101-L120 Snapshots should be adding these filters and actions (as required) if `! has_filter()` or `! has_action()`.
The constructor for
WP_Customize_Widgetshas this bit of code before it does theadd_action()andadd_filter()calls:This will cause a problem for previewing widgets on the frontend for unauthenticated users because these filters/actions aren't getting added: https://github.com/xwp/wordpress-develop/blob/885d38edc8de04c3cf7baced5ef0effc8c5a6bd6/src/wp-includes/class-wp-customize-widgets.php#L101-L120
Snapshots should be adding these filters and actions (as required) if
! has_filter()or! has_action().