Forms | Business email validation (on submit)

add_filter( ‘gform_validation’, function( $result ) { $blocked = [ ‘gmail.com’,’googlemail.com’,’yahoo.com’,’ymail.com’,’rocketmail.com’, ‘hotmail.com’,’outlook.com’,’live.com’,’msn.com’, ‘icloud.com’,’me.com’,’mac.com’, ‘aol.com’,’aim.com’, ‘proton.me’,’protonmail.com’, ‘yandex.com’,’mail.com’,’zoho.com’,’gmx.com’,’fastmail.com’,’yumobiz.com’ ]; $form = $result[‘form’]; $is_valid = $result[‘is_valid’]; // keep GF’s existing validation state foreach ( $form[‘fields’] as &$field ) { $is_email = ( $field->type ===…Continue reading

Home page

add_action(‘wp_head’, ‘ggs_homepage_schema_1901’, 20); function ggs_homepage_schema_1901() { if (!is_page(1901)) { return; } $schema = [ ‘@context’ => ‘https://schema.org’, ‘@graph’ => [ [ ‘@type’ => ‘ProfessionalService’, ‘@id’ => ‘https://goodguysseo.com/#organization’, ‘name’ => ‘Good Guys SEO’, ‘url’ => ‘https://goodguysseo.com/’, ‘telephone’ => ‘+1-917-402-3438′, ’email’ =>…Continue reading

[Papa Macros] Register Bulk Discount Threshold Reached Message Shortcode

add_shortcode(‘papa_macros_discount_message’, ‘papa_macros_discount_message_shortcode’); function papa_macros_discount_message_shortcode() { if ( ! function_exists(‘WC’) || ! WC()->cart ) { return ”; } $cart = WC()->cart; $manual_subtotal = 0; foreach ( $cart->get_cart() as $item ) { if ( ! isset($item[‘data’]) || ! is_object($item[‘data’]) ) continue; $price…Continue reading