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
/*create a php file in the root directory, paste these codes and open the file in browser (https://yoursite.com/filename.php)*/ | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="robots" content="noindex, nofollow"/> | |
<title>Search and replace files</title> | |
</head> | |
<body style="margin: 0; padding: 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
<script> | |
;(function($){ | |
$(window).on('load', function(){ | |
var maxHeight = 0, | |
items = $('.customers-review .swiper-slide'); | |
items.each(function () { | |
maxHeight = ($(this).height() > maxHeight ? $(this).height() : maxHeight); | |
}); | |
//Assign maximum height to children |
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_action( 'woocommerce_order_status_changed', 'your_function', 99, 4 ); | |
function your_function( $order_id, $old_status, $new_status, $order ){ | |
if( $new_status == "completed" ) { | |
var_dump($order); | |
$user_id = $order->get_user_id(); | |
$user = new WP_User($user_id); | |
$user->set_role('subscriber'); | |
} | |
} |
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
body.login.login-password-protected { | |
position: relative; | |
overflow: hidden; | |
display: flex; | |
justify-content:center; | |
align-items: center; | |
} | |
body.login.login-password-protected:after { | |
position: absolute; |
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 PMPro billing fields to the edit user profile page. | |
You must Paid Memberships Pro and the Register Helper plugin installed: | |
http://wordpress.org/extend/plugins/paid-memberships-pro | |
https://github.com/strangerstudios/pmpro-register-helper | |
*/ | |
function add_billing_fields_to_profile() | |
{ | |
global $pmpro_countries; | |
NewerOlder