This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
# START XML RPC BLOCKING | |
<Files xmlrpc.php> | |
Order Deny,Allow | |
Deny from all | |
</Files> | |
# FINISH XML RPC BLOCKING |
This file contains hidden or 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
// Add this code to your theme’s functions.php | |
function ewp_remove_script_version( $src ) { | |
return remove_query_arg( 'ver', $src ); | |
} | |
add_filter( 'script_loader_src', 'ewp_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', 'ewp_remove_script_version', 15, 1 ); |
This file contains hidden or 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
//aumentar as imagens nos pedidos do woocommerce | |
add_action('admin_head', 'my_custom_fonts'); | |
function my_custom_fonts() { | |
echo '<style> | |
#woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items td.thumb .wc-order-item-thumbnail{width:150px!important; height:150px!important} | |
#woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{color:#000!important;font-weight:bold!important} | |
#woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .view{color:#0099d5!important;background:#e5f5fb!important;} | |
</style>'; | |
} |
This file contains hidden or 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
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {min-height: 500px !important; margin-bottom:10px; } | |
ul.products li.product a.button {position: absolute !important; bottom: 500px; } | |
.box-text { | |
min-height: 145px; | |
position: relative; | |
} | |
.add-to-cart-button { | |
position: absolute; | |
top: 90px; |
This file contains hidden or 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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^yoururl.com [NC] | |
RewriteRule ^(.*)$ http://www.yoururl.com/$1 [L,R=301,NC] | |
RewriteEngine On | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
This file contains hidden or 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 to change email address | |
function wpb_sender_email( $original_email_address ) { | |
return '[email protected]'; | |
} | |
// Function to change sender name | |
function wpb_sender_name( $original_email_from ) { | |
return 'YOUR NAME'; | |
} |
This file contains hidden or 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
//Adicionar campo no checkout e nova coluna no painel admin | |
/*Add the field to the checkout*/ | |
add_action('woocommerce_before_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { | |
echo '<div id="my_custom_checkout_field"><h3>'.__('Como nos conheceu?').'</h3>'; | |
woocommerce_form_field( 'my_field_name', array( |
This file contains hidden or 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
//Remove as tabs da pag do produto | |
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; | |
} |
This file contains hidden or 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
//personalizar as imagens e fontes nos pedidos do woocommerce | |
add_action('admin_head', 'my_custom_fonts'); | |
function my_custom_fonts() { | |
echo '<style> | |
#woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items td.thumb .wc-order-item-thumbnail{width:150px!important; height:150px!important} | |
</style>'; | |
} |