Skip to content

Instantly share code, notes, and snippets.

Hannes Etzelstorfer haet

  • haet.webdevelopment
  • austria
Block or report user

Report or block haet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@haet
haet / functions.php
Created Mar 27, 2019
disable email template for multiple subjects
View functions.php
add_filter( 'haet_mail_use_template', 'customize_template_usage', 10, 2 );
function customize_template_usage( $use_template, $mail ){
if( strpos( $mail['subject'], 'Subject 1' ) !== false
|| strpos( $mail['subject'], 'Subject 2' ) !== false
|| strpos( $mail['subject'], 'Subject 3' ) !== false )
return false;
return $use_template;
}
// if you know the exact subject line you can also use == instead of strpos():
@haet
haet / functions.php
Created Mar 21, 2019
Add coupons codes to your WooCommerce emails using WP HTML Mail
View functions.php
add_filter( 'haet_mail_placeholder_menu', 'add_mailbuilder_coupons_placeholder' );
add_filter( 'haet_mail_order_placeholders', 'populate_mailbuilder_coupons_placeholder', 10, 3 );
function add_mailbuilder_coupons_placeholder( $placeholder_menu ){
if( is_array( $placeholder_menu ) ){
$placeholder_menu[] = array(
'text' => 'Coupons',
'tooltip' => '[COUPONS]',
);
}
return $placeholder_menu;
@haet
haet / functions.php
Last active Oct 4, 2018
Add custom CSS to WP HTML Mail WordPress E-Mails
View functions.php
/**
* Add custom CSS to WP HTML Mail WordPress E-Mails
*/
add_filter( 'haet_mail_modify_styled_mail', function( $email_html ){
$custom_css = '
.container-padding{
padding-left: 60px;
padding-right: 0;
}
@haet
haet / functions.php
Last active Mar 21, 2019
Add custom Placeholder / Shortcode to Mailbuilder
View functions.php
<?php
add_filter( 'haet_mail_placeholder_menu', 'add_mailbuilder_placeholder' );
add_filter( 'haet_mail_order_placeholders', 'populate_mailbuilder_placeholder', 10, 3 );
function add_mailbuilder_placeholder( $placeholder_menu ){
if( is_array( $placeholder_menu ) ){
$placeholder_menu[] = array(
'text' => 'My Placholder Name',
'tooltip' => '[MY_PLACEHOLDER]',
);
View salutation.php
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CleverReach Salutation</title>
<!-- Latest compiled and minified CSS -->
@haet
haet / de.po
Created Jun 20, 2014
Paid membership Pro German translation
View de.po
# This file was generated by WPML
# WPML is a WordPress plugin that can turn any WordPress or WordPressMU site into a full featured multilingual content management system.
# https://wpml.org
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
View wp-shell-install.sh
#!/bin/bash
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert
# Disclaimer: It might not bloody work
# Disclaimer 2: I'm not responsible for any screwups ... :)
# DB Variables
echo "MySQL Host:"
read mysqlhost
export mysqlhost
@haet
haet / demo.php
Created Jun 25, 2012
sneak.vu php-curl api
View demo.php
<?php
require_once('sneakvu.php');
?>
<html>
<head>
<title>
sneak.vu demo page
</title>
You can’t perform that action at this time.