This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function erroPS($eV) { | |
let $err = ''; | |
switch($eV) | |
{ | |
case "5003": $err = "Falha de comunicação com a instituição financeira"; break; | |
case "10000": $err = "Marca de cartão de crédito inválida"; break; | |
case "10001": $err = "Número do cartão de crédito com comprimento inválido"; break; | |
case "10002": $err = "Formato da data inválida"; break; | |
case "10003": $err = "Campo de segurança CVV inválido"; break; | |
case "10004": $err = "Código de verificação CVV é obrigatório"; break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cadastro = (get_page_by_title( "Faça seu cadastro")) ? get_page_by_title( "Faça seu cadastro")->ID : 89; | |
if ( is_user_logged_in() ) { | |
$user = wp_get_current_user(); | |
$billing_postcode = get_field( 'billing_postcode', get_current_user_id() ); | |
$billing_number = get_field( 'billing_number', get_current_user_id() ); | |
$billing_street = get_field( 'billing_street', get_current_user_id() ); | |
$billing_phone = get_field( 'billing_phone', get_current_user_id() ); | |
$billing_neighborhood = get_field( 'billing_neighborhood', get_current_user_id() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Selecione seu estado | |
AC : Acre | |
AL : Alagoas | |
AP : Amapá | |
AM : Amazonas | |
BA : Bahia | |
CE : Ceará | |
DF : Distrito Federal | |
ES : Espírito Santo | |
GO : Goiás |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select class="select-control" id="field_5c012a2b5e7d0" name="acf[field_5c012a2b5e7d0]"> | |
<option value="AC">Acre</option> | |
<option value="AL">Alagoas</option> | |
<option value="AP">Amapá</option> | |
<option value="AM">Amazonas</option> | |
<option value="BA">Bahia</option> | |
<option value="CE">Ceará</option> | |
<option value="DF">Distrito Federal</option> | |
<option value="ES">Espírito Santo</option> | |
<option value="GO">Goiás</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.mobileAndTabletcheck = function() { | |
var check = false; | |
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// read more at | |
var $div = $(".card"); | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (mutation.attributeName === "class") { | |
var attributeValue = $(mutation.target).prop(mutation.attributeName); | |
console.log("Class attribute changed to:", attributeValue); | |
console.log($(mutation.target)); | |
$( document ).trigger( "validateCard", attributeValue ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Allow hooking into ACF repeated fields with meta queries | |
*/ | |
function repeaterAdapter( $where ) { | |
$where = str_replace("meta_key = 'repeaterName_$", "meta_key LIKE 'repeaterName_%", $where); | |
return $where; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text-gradient { | |
background-blend-mode: soft-light; | |
background-image: linear-gradient(to top, rgb(16, 18, 16), rgb(255, 255, 255)), linear-gradient(tan, rgb(212, 181, 120)); | |
-webkit-background-clip: text; | |
background-clip: text; | |
-webkit-text-fill-color: transparent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function lastProducts($limit){ | |
$sitesData = get_sites(['number' => 200000000]); | |
$posts = []; | |
foreach ( $sitesData as $sites_datumk=>$sites_datum ) { | |
$st = []; | |
switch_to_blog( $sites_datum->blog_id ); | |
$st = get_posts([ | |
'post_type'=>'product', | |
'posts_per_page' => $limit, |