your code is not working, because you use strtotime
incorrectly… It should be used like this:
int strtotime ( string $time [, int $now ] )
But you pass formatted dated as first param, and another string as second one.
So how should it look like? Like so:
$addeddays = intval( get_user_meta($this->order->user_id, 'xxx', true) );
$timeBase = date('Y-m-d');
echo date('j.n.Y', strtotime( "+ {$addeddays} days", strtotime( $timeBase ) ));
Or a simpler version (since `$timeBase is today:
$addeddays = intval( get_user_meta($this->order->user_id, 'xxx', true) );
echo date( 'j.n.Y', strtotime( "+ {$addeddays} days" ) );
Related Posts:
- User Meta Value not echoing despite Var_Dump Showing correct string
- Store custom field’s multiple values in one user meta key
- Get field in readable word
- Get meta_query value by user meta array
- Convert custom field date format to “WordPress default”
- Calculate business days
- Most efficient way to add javascript file to specific post and/or pages?
- the_date() not working
- Display all values of custom a field created with ACF on a page
- How to automatically apply woocommerce product title to all product images alt tags?
- If Custom Field is empty don’t display div
- How to make an meta_query optional?
- Archive listing of posts by publish year (multiple years)
- Add custom field to attachments in a specific category
- WordPress returns a wrong date
- How can update custom meta for all posts
- get_post_custom single array
- Make custom field meta not display if there is not data in it
- Way to display “Yesterday”, “Today”
- how to increase custom post value by one most efficiently?
- How do I display a user’s previous orders as a select box option on a product?
- Passing the custom field values in the wp_get_current_user array function
- Custom profile field with birthday. Troubles with
- wordpress allow user to edit user profile with custom fields
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- How can I save unique user data on my site? [closed]
- Set meta field to publish date + 2 weeks
- How to use thumbnail size of image if I’m only using src to get image
- Trying to retrieve post meta
- a:0:{} is replaced into database as s:6:”a:0:{}”;
- How to combine 2 php functions into one function with a custom field
- Advanced Custom Fields – display label and value only if value entered
- Is it possible to retrieve all posts with a certain value for metadata?
- Saving zero in meta box
- Convert WordPress date format to jQuery UI Datepicker format
- Why does this update_post_meta function not delete the custom field itself?
- How to update and save user metadata on page visits?
- If Array Values Match Another Array’s Values, Then
- WordPress loop by meta key that is an array? and how loop multiple arrays
- if custom field doesn’t exist, use post thumbnail instead, as image background
- Getting different user data depending on where I use variable
- WP All Import / Update stock quantity from multiple XML files
- How to store multiple custom meta box
- Comapare get_user_meta value
- How can get all users by current user meta?
- Concatenate Custom Field Value & HTML Value
- `update_post_meta` not working anymore
- Define category ID using get_post_meta
- Hide a div when a custom field is empty
- Adding custom url to readmore link using get_permalink()
- Filter unique custom field value based on custom taxonomy category or other custom field
- Display movies that apear this day next
- Add “alt” Attribute to GD Star Rating Tags
- Display background color or image with custom meta box?
- custom header text
- Can ‘Custom Field’ data be inserted into this Short Code?
- Query pulling a single post per month
- Add custom fields from different posts
- Adding a custom meta field with default NULL value which is not selectable
- Order category posts by last word of custom field
- Products listing check if meta checkbox is checked
- How to update custom fields when post is published?
- Block error message in foreach loop when looping through ACF field
- Include User ID in iFrame URL
- Hide a div if the fiels is empty
- Inserting a class on before_widget if checkbox is checked
- WordPress wrong dates bug
- Don’t update modified post date when user add a product review or comment?
- What is the correct way to search 3 custom fields only in WordPress?
- Store data from JavaScript object to custom table in user account
- wp_get_nav_menu_items() with ACF
- Changing Date Format on Custom Meta Data w/shortcode call
- How do I get the value of a current user’s custom field?
- How to change the value of a variable using input field?
- Primary navigation menu with timed items from custom post type
- Where do I implement this display of User Meta Data, and how to put it in a table?
- How to display custom field from a gallery thumbnail?
- Getting a value from a custom field from a page that shares a parent with the current page
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Updating custom user meta
- Custom fields changes the formatting of metabox input
- Updating meta_value in a custom key
- Display Year and Month from custom field + Age Calculator
- Display Content Based on Custom Field Value
- Limit the number of successful logins
- Get author meta of all writers
- If custom field doesn’t exist, or exists and it’s true show title?
- Custom field in title
- How can I put a custom field as the link of a button shortcode?
- Let users register weight each day and save it in DB
- Outputting a custom field in PHP
- Custom fields randomly stop working
- Where can I find the code for the menu page meta boxes?
- PHP Puzzle: Unique Styles with PHP loop
- I want Page titles and excerpts to show up on home.php in certain order
- Metadata on the WP_Post object
- Appending an ACF custom field to the page title
- A better way to write this php function
- Import users and custom user meta from csv
- How to execute a shortcode within a custom field?