order
This commit is contained in:
parent
c7dcb62b0d
commit
02abf6117b
|
@ -139,6 +139,11 @@ class WC_Order {
|
|||
$this->status = (isset($terms[0])) ? $terms[0] : 'pending';
|
||||
}
|
||||
|
||||
function key_is_valid( $key ) {
|
||||
if ($key==$this->order_key) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_formatted_billing_address() {
|
||||
if (!$this->formatted_billing_address) :
|
||||
global $woocommerce;
|
||||
|
@ -635,7 +640,7 @@ class WC_Order {
|
|||
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
|
||||
|
||||
$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
|
||||
$commentdata['comment_agent'] = substr($_SERVER['HTTP_USER_AGENT'], 0, 254);
|
||||
if (isset($_SERVER['HTTP_USER_AGENT'])) $commentdata['comment_agent'] = substr($_SERVER['HTTP_USER_AGENT'], 0, 254);
|
||||
|
||||
$commentdata['comment_date'] = current_time('mysql');
|
||||
$commentdata['comment_date_gmt'] = current_time('mysql', 1);
|
||||
|
|
Loading…
Reference in New Issue