Title: dkardell's Replies | WordPress.org

---

# dkardell

  [  ](https://wordpress.org/support/users/dkardell/)

 *   [Profile](https://wordpress.org/support/users/dkardell/)
 *   [Topics Started](https://wordpress.org/support/users/dkardell/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dkardell/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dkardell/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dkardell/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dkardell/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dkardell/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[All-in-One WP Migration and Backup] Move to a new domain](https://wordpress.org/support/topic/move-to-a-new-domain-2/)
 *  Thread Starter [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/move-to-a-new-domain-2/#post-15689633)
 * Awesome. thanks! Is there anyway to just append the users table or does it have
   to overwrite the entire thing?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[All-in-One WP Migration and Backup] Move to a new domain](https://wordpress.org/support/topic/move-to-a-new-domain-2/)
 *  Thread Starter [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/move-to-a-new-domain-2/#post-15689501)
 * oh really. so my local site is a [http://test.local](http://test.local) and when
   I import it to [https://www.example.com](https://www.example.com), I literally
   do not have to change all of the test.local to [http://www.example.com?](http://www.example.com?)
    -  This reply was modified 4 years, 1 month ago by [dkardell](https://wordpress.org/support/users/dkardell/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sucuri Security - Auditing, Malware Scanner and Security Hardening] Event: Failed Login non user](https://wordpress.org/support/topic/event-failed-login-non-user/)
 *  Thread Starter [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/event-failed-login-non-user/#post-11632157)
 * Thanks.. I want to see any others not just this one and didn’t know if it was
   able to be added to an ignore list
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Clone] Please Add Support for PHP 7](https://wordpress.org/support/topic/please-add-support-php-7/)
 *  [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/please-add-support-php-7/#post-10260231)
 * Any update on this issue?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sucuri Security - Auditing, Malware Scanner and Security Hardening] Lockdown of wp-admin with .htaccess / Sucuri still reporting Failed attempts](https://wordpress.org/support/topic/lockdown-of-wp-admin-with-htaccess-sucuri-still-reporting-failed-attempts/)
 *  Thread Starter [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/lockdown-of-wp-admin-with-htaccess-sucuri-still-reporting-failed-attempts/#post-7291174)
 * Awesome!!! thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] How to modify Cart Sessions on the checkout (and is this the correct approach)](https://wordpress.org/support/topic/modify-cart-session-on-the-checkout/)
 *  [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/modify-cart-session-on-the-checkout/#post-6263721)
 * Did you ever get an answer to this. I need to do the same thing. I need to set
   a varaible on a jQuery.change so trying to do it inside of my test.php, but the
   WC() variable is not available.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Add fee dynamically depending on textfield](https://wordpress.org/support/topic/add-fee-dynamically-depending-on-textfield/)
 *  [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/add-fee-dynamically-depending-on-textfield/#post-5925085)
 * Did you ever get this answered?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Calculate Shipping Button] was working, but not after upgrading to latest WP version](https://wordpress.org/support/topic/was-working-but-not-after-upgrading-to-latest-wp-version/)
 *  [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/was-working-but-not-after-upgrading-to-latest-wp-version/#post-5687064)
 * Any updates on getting this working. What is everyone else using to show shipping
   costs from a product page?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API] Authentication](https://wordpress.org/support/topic/authentication-6/)
 *  Thread Starter [dkardell](https://wordpress.org/support/users/dkardell/)
 * (@dkardell)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/authentication-6/#post-5207393)
 * Well I “got around it” but I’m not happy with the way I did.
 * I validate a user with a login.php page that looks like this (called from my 
   ios app)
 *     ```
       <?php
       header("Content-type: text/json");  
   
       header('Cache-Control: no-cache');
       header('Expires: Mon, 01 Jan 1996 00:00:00 GMT');
   
       $username = $password = "";
   
       if ($_SERVER["REQUEST_METHOD"] == "POST") {
   
       	require_once('wp-load.php');		
   
       	if (isset($_POST['username'])) {
       		$username  = $_POST['username'];
       		}
   
       	if (isset($_POST['password'])) {
       		$password  = $_POST['password'];
       		}
   
       	$user = get_user_by('login',$username);
   
       	$validUser = false;
   
       	if ( $user and wp_check_password($password, $user->data->user_pass, $user->ID) )
       		$validUser = true;
   
       	$result[]= array (
       	"username" => $username,
       	"password" => $password,
       	"user" => $user,
       	"rc" => 0,
       	"valid user" => $validUser,
       	"type" => "Login Result"
       	);
   
       	echo json_encode($result);
   
       }
       else {
       	$result[]= array (
       	"rc" => 1,
       	"type" => "Login Result",
       	"error_msg" => "request was not a post"
       	);
   
       	echo json_encode($result);
   
       }
       ?>
       ```
   
 * Then I just placed a PHP page on the server that would get the info once I got
   back a valid login from the login.php
 * JSON api page:
 *     ```
       <?php
       header("Content-type: text/json");
       header('Cache-Control: no-cache');
       header('Expires: Mon, 01 Jan 1996 00:00:00 GMT');
   
       $username = $password = "";
   
       if ($_SERVER["REQUEST_METHOD"] == "POST") {
   
       	require_once('wp-load.php');	
   
       	$username = ""; // user admin username
       	$password = ""; // admin password
   
       	$user = get_user_by('login',$username);
   
       	$validUser = false;
   
       	if ( $user and wp_check_password($password, $user->data->user_pass, $user->ID) )
       		$validUser = true;
   
       	$query = new WP_Query( 'pagename=xxxxx' ); // where xxxxx is your wordpress page that you want returned
   
       		$result[]= array (
       	"rc" => 0,
       	"valid user" => $validUser,
       	"type" => "Login Result",
       	"url return" => $query
       	);
   
       	echo json_encode($result);
   
       }
       else {
       	$result[]= array (
       	"rc" => 1,
       	"type" => "Login Result",
       	"error_msg" => "request was not a post"
       	);
   
       	echo json_encode($result);
   
       }
       ?>
       ```
   

Viewing 9 replies - 1 through 9 (of 9 total)