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 include 'wp-load.php'; | |
//$user = get_user_by( 'email', 'emailcadastrado@email.com' ); | |
$user = get_user_by( 'slug', 'usuario' ); | |
//$user = get_user_by( 'login', 'usuario' ); | |
wp_set_password( "new_password", $user->ID ); | |
// Just use ID=1 for the super admin account | |
wp_set_password( "new_password", 1 ); | |
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 | |
/* | |
Plugin Name: WooCommerce Custom Account Fields | |
Plugin URI: https://iconicwp.com/blog/the-ultimate-guide-to-adding-custom-woocommerce-user-account-fields/ | |
Description: Add custom WooCommerce user account fields. | |
Author: Iconic | |
Version: 1.0.0 | |
Author URI: https://iconicwp.com/products/ | |
*/ |
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
/** | |
* WordPress Plugin: Masks Form Fields v1.2 - https://wordpress.org/plugins/masks-form-fields/ | |
* PHP - Custom script to add mask in input phone the WooCommerce. /wp-content/themes/YOUR-THEME/functions.php | |
*/ | |
add_action('wp_footer', function () {echo "<script type=\"text/javascript\">jQuery(document).ready(function($){ $(\"input[name='billing_phone']\").mask('(000) 000-0000'); });</script>";}, 111); | |
/** | |
* WordPress Plugin: Masks Form Fields v1.2 - https://wordpress.org/plugins/masks-form-fields/ | |
* JavaScript - Custom script to add mask in input phone the WooCommerce. | |
*/ |
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
.blocked | |
{ | |
position:relative; | |
} | |
.blocked:after | |
{ | |
content: ''; | |
position: absolute; | |
left:0; | |
right:0; |
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
.thumb { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%,-50%); | |
width: 170px; | |
height: 170px; | |
@media(max-width: 768px){ | |
width: 50px; | |
height: 50px; |
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
add_filter("wp_get_nav_menu_items", function ($items, $menu, $args) { | |
if( $menu->term_id != 111 ) return $items ; | |
// don't add child categories in administration of menus | |
if (is_admin()) { | |
return $items; | |
} | |
foreach ($items as $index => $i) { |
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
/* | |
* Step 1. Add Link (Tab) to My Account menu | |
*/ | |
add_filter ( 'woocommerce_account_menu_items', 'misha_log_history_link', 40 ); | |
function misha_log_history_link( $menu_links ){ | |
$menu_links = array_slice( $menu_links, 0, 5, true ) | |
+ array( 'log-history' => 'Log history' ) | |
+ array_slice( $menu_links, 5, NULL, true ); | |
OlderNewer