Mailhog Requires Go 1.4+ to run so we will install GO language in system.
sudo apt install golang-go -y
Cross verify Go language is successfully installed.
<?php | |
// The libxml entity loader is disabled by default | |
// even setting the libxml_disable_entity_loader to false doesn't works! | |
// | |
// @see http://uk3.php.net/manual/en/function.libxml-disable-entity-loader.php | |
// @see http://stackoverflow.com/a/10213239 | |
$dir = __DIR__; | |
$content = 'This is a remote content!'; | |
file_put_contents('content.txt', $content); |
Bin e padrões para validação de cartão de crédito.
Bandeira | Começa com | Máximo de número | Máximo de número cvc | Regex |
---|---|---|---|---|
Visa | 4 |
13,16 | 3 | ^4[0-9]{12}(?:[0-9]{3}) |
Mastercard | 5 |
16 | 3 | ^5[1-5][0-9]{14} |
Diners | 301,305,36,38 link |
14,16 | 3 | `^3(?:0[0-5] |
<?php | |
/** | |
* Wraps a message $content in a responsive e-mail template. | |
* | |
* Reference: http://zurb.com/playground/projects/responsive-email-templates/basic.html | |
*/ | |
function post_mail_content( $content ) { | |
ob_start(); ?><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
<meta content="width=device-width" name="viewport"> |
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); | |
function wc_minimum_order_amount() { | |
global $woocommerce; | |
$minimum = 10; | |
if ( $woocommerce->cart->get_cart_total(); < $minimum ) { | |
$woocommerce->add_error( sprintf( 'You must have an order with a minimum of %s to place your order.' , $minimum ) ); | |
} | |
} |
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); | |
function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); | |
?> | |
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a> |
// SmoothScroll for websites v1.2.1 | |
// Licensed under the terms of the MIT license. | |
// People involved | |
// - Balazs Galambosi (maintainer) | |
// - Michael Herf (Pulse Algorithm) | |
(function(){ | |
// Scroll Variables (tweakable) |
"abaixo","aca","acaso","acerca","acima","acola","acula","ademais","adentro","adiante","afinal","afora","agora","agorinha","ah","ainda","alem","algo","alguem","algum","alguma","algumas","alguns","ali","alias","alo","ambos","amiude","ante","antes","ao","aonde","aos","apenas","apesar","apos","apud","aquela","aquelas","aquele","aqueles","aqui","aquilo","as","assim","ate","atras","atraves","basicamente","bastante","bastantes","bem","bis","bom","ca","cada","cade","caso","certa","certamente","certas","certeiramente","certo","certos","chez","chi","comigo","como","comumente","conforme","confronte","conosco","conquanto","consequentemente","consigo","consoante","contanto","contigo","contra","contudo","convosco","cuja","cujas","cujo","cujos","da","dai","dali","dantes","daquela","daquelas","daquele","daqueles","daqui","daquilo","das","de","debaixo","defronte","dela","delas","dele","deles","demais","dentre","dentro","depois","desde","dessa","dessas","desse","desses","desta","destas","deste","destes","detras","deveras","dia |
<?php | |
/* | |
Template Name: Print Processing Orders :) | |
*/ | |
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.'); | |
?> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |