dkardell
Forum Replies Created
-
Forum: Plugins
In reply to: [All-in-One WP Migration and Backup] Move to a new domainAwesome. thanks! Is there anyway to just append the users table or does it have to overwrite the entire thing?
Forum: Plugins
In reply to: [All-in-One WP Migration and Backup] Move to a new domainoh really. so my local site is a https://test.local and when I import it to https://www.example.com, I literally do not have to change all of the test.local to https://www.example.com?
- This reply was modified 2 years, 9 months ago by dkardell.
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
In reply to: [Clone] Please Add Support for PHP 7Any update on this issue?
Awesome!!! thanks!
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
In reply to: [WooCommerce] Add fee dynamically depending on textfieldDid you ever get this answered?
Any updates on getting this working. What is everyone else using to show shipping costs from a product page?
Forum: Plugins
In reply to: [JSON API] AuthenticationWell 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); } ?>