You could consider working with unix timestamps (a numerical representation of a date and time that is the seconds elapsed since 00:00:00 1st January 1970). This makes the math easier since we would be working with plain numbers:
// Convert pick up date to unix timestamp integer.
$start_timestamp = strtotime( get_field( 'pick_up_date' ) . ' 00:00:00' );
// Get the number of weeks as seconds:
// 60 - seconds in a minute, minutes in an hour.
// 24 - hours in a day.
// 7 - days in a week.
$weeks_in_seconds = get_field( 'number_of_weeks' ) * 7 * 24 * 60 * 60;
// Add the weeks period of time to our start timestamp.
$end_timestamp = $start_timestamp = $weeks_in_seconds;
// Convert our result timestamp back to a date string.
$end_date = gmdate( 'd/m/Y', $end_timestamp );
Related Posts:
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- How to display product price of the product in loop
- Display Advanced Custom Fields value in Woocommerce admin order details
- Display custom field without plugin in woocommerce
- wp_set_object_terms being undone
- How to give each category name its own ACF background color?
- Need to check if user has completed a woo commerce payment
- How to retrieve a Menu Name by Menu Location with ACF fields
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- ACF in WooCommerce mail template
- creating number of database entries based on users numerical input
- How to store ACF from product in user_meta?
- how to get woocommerce product id by acf field in wordpress and display product
- How to get an Array from “select” field in advanced custom fields
- Insert a custom field as a second email address to a completed order in WooCommerce
- Add field to category woocommerce page
- acf_form() – “On Update” action [closed]
- ACF Create Array of All Woocommerce Product IDs with a Checkbox ticked
- WooCommerce: expiring date for products (and on sale some days before)
- add_filter to modify woocommerce_cart_item_name hyperlink
- How to get rid of the hover zoom in WooCommerce single products
- How do I display certain products via their category on a section of a page using PHP?
- Display orders instead of woocommerce my account dashboard for logged in users [closed]
- Detect whether a page is a product subcategory page?
- Programmatically change Payment Methods WooCommerce
- Get WooCommerce Email Classes in Backend
- pre_get_posts with WooCommerce Shortcode Query
- WooCommerce is slow with many categories [closed]
- How to remove recurring totals information for a particular subscription product? [closed]
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- How to get all attributes with their terms related to specific Woocommerce product category [closed]
- Woocommerce – disable «place order» until user checks Privacy Policy
- Calling calculate_shipping() with ajax in woocommerce
- Adding product SKU before cart item name in WooCommerce
- Accessing parameters when adding filter
- WooCommerce Multi-Currency shortcode not working
- Filter WooCommerce Orders query with user meta data
- Child theme dosn’t overwrite WooCommerce (version 3.4.7)
- How to Show Single Product – 4 Data by ID in Custom Page without over-riding the existing Woo-Commerce
- WOOCommerce redirect after registration to account details
- How can I add an additional action button into the woocommerce admin order page?
- rating, share and review issue for single WooCommerce page
- Delete All Product Images in phpmyadmin
- How to add a custom text for order confirmation email template woocommerce
- I want to get the value of a select attribute in the checkout page, and then use it to show or not the delivery data
- woocomerce is serving OR Relation instead of AND on taxonomy product_tag
- Woocommerce Subscriptions – Set Billing Interval/Period
- WooCommerce with ACF: custom fields per product variation
- How to display text between product thumbnail and CTA button on WooCommerce “Shop” page
- Multiple archive product exist
- call_user_func_array() error in class-wp-hook.php
- Reset all stock status in woocommerce
- How to – proper WordPress 301 redirects?
- how to create additional button on single product page
- Woocommerce check if email already created order recently [closed]
- Is it possible to checkout with 2 different shipping options on a single order? [closed]
- Sender e-mail address, for new order email to customer, is suddenly wrong [closed]
- Pass class to Woocommerce shortcode [relative_products] [closed]
- Woocommerce product editor does not add br
- A Woo commerce extension has deleted my old theme.How to undo? [closed]
- How can I remove a WooCommerce Product Tab’s sub section in wp-admin?
- is_shop doesn’t work for woocommerce [closed]
- Strip string from $_product->get_title() to get a cleaner mini-cart
- Create new email in WooCommerce
- Ajax add to cart not updating Elementor mini cart totals
- I want to store user password (during registration) in an other table in the same database in addition to the user table MD5 Hash
- How to edit the default woo-commerce Store page meta title tag “Products”
- Unable to add product to the cart
- Custom Email via Hook only for completed order
- Woocommerce : Add name filed of checkout page to buyers wordpress display name
- Help to locate a woocommerce hook method
- woocommerce_product_quick_edit_save hook not fired
- Changing Title Tag on Shop Archive Page (current solution reverting to Title of First Product in Loop)
- WooCommerce return 404 in the product page
- How to remove Calendar on Woocommerce Category Pages
- What is the meta_key for woocommerce discount amount?
- Query product’s image path by category WooCommerce database?
- Delete comma in front of currency woocommerce
- Not displaying Category and subcategory from woocommerce Pluign
- Collapsible product categories on sidebar?
- currentURL is not defined
- Adding a second button next to the shop button Woocommerc [closed]
- Add button linked to single product page on order detail page
- Woocommerce REST API not considering discounts and coupons
- Multiple sorting criteries (order by)
- Woocommerce Order Reports MYSQL
- woocommerce price filter not working when change currency
- syntax error – woocommerce
- How to on/off woocommerce filter with redux framework [closed]
- Add youtube embed to woocommerce variations
- WooCommerce – Large number of product variations (200+)
- Add custom link/pop up under variations dropdown
- Admin Order adding an extra product on add_line_item
- Is it possible Different templates of products for specific category in WooCommerce?
- WooCommerce: Conditional Tag for Wishlist Page
- Display x number of terms and exclude hidden
- Hide woocommerce login form
- Allow authors to use their own PayPal account and payment process automation [closed]
- Can a woocommerce hook alter the UI of a website?
- How to show Woocommerce add to cart form for variable product on custom location [closed]