logging out with/without confirmation – single site, multisite

Output the logout link with wc_logout_url() and it will be nonced and have no confirmation. The confirmation is a security measure. You could also try adding the following to your functions.php or a plugin: // Logout without confirmation. function wpse_bypass_logout_confirmation() { global $wp; if ( isset( $wp->query_vars[‘customer-logout’] ) ) { wp_redirect( str_replace( ‘&’, ‘&’, wp_logout_url( … Read more

How do I ensure I can loop through every enqueued script and CSS?

In terms of the basics, I have learned that there are two actions to hook – wp_print_scripts and wp_print_styles which I understand are called just before they are then added to the header. add_action( ‘wp_print_scripts’, ‘my_list_scripts’ ); function my_list_scripts() { global $wp_scripts; $enqueued_scripts = array(); foreach( $wp_scripts->queue as $handle ) { // do something clever … Read more