Skip to content

Instantly share code, notes, and snippets.

View franyuttii's full-sized avatar
💻
Coding</>

Maximiliano Orozco franyuttii

💻
Coding</>
View GitHub Profile
@codigoconjuan
codigoconjuan / app.js
Created October 6, 2022 22:32
Validar email
const regex = /^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/
@lukecav
lukecav / functions.php
Created September 15, 2017 19:59
Bypass logout confirmation in WooCommerce
function wc_bypass_logout_confirmation() {
global $wp;
if ( isset( $wp->query_vars['customer-logout'] ) ) {
wp_redirect( str_replace( '&amp;', '&', wp_logout_url( wc_get_page_permalink( 'myaccount' ) ) ) );
exit;
}
}
add_action( 'template_redirect', 'wc_bypass_logout_confirmation' );