Afterpay | Site Banner Q3 2026 (US version)

Added by Colleen Harrison on August 11, 2026   Contractual placement to promote Afterpay in supported geos.   Creative: use Cash App Afterpay logo (not original mint version) in the US

Banner image
Product Icon

WooCommerce Pre-Orders

Allow customers to order products before they are available.

Shortcode to display availability date/time on pre-order products

A shortcode to display availability date/time on pre-order products can help to create custom layouts for product pages using visual page builders.

It would be great to have all the custom meta information exposed through shortcodes.

Author

Anonymous

Current Status

Open

Last updated: September 30, 2021

2 comments

Log in to comment on this feature request.

  1. multiaddons says:

    A shortcode is definitely cleaner than the custom PHP snippet above, especially since that only works if you’re comfortable dropping code into a page builder — not every store owner is.

    Smart Pre-Order Manager for WooCommerce includes a shortcode to display the availability date/time on pre-order products, so you can drop it directly into visual page builders without writing custom code.

    Happy to help if you have questions about setting it up.

  2. mattdd4fd6a08da says:

    I am using Oxygen page builder and created this code to fetch and display the single product page message, which you can customize in your Pre-Orders settings:

    <?php
    if ( function_exists( 'wc_get_product' ) ) {
    // Get the WC_Product object
    $product_id = get_the_ID();
    $product = wc_get_product( $product_id );

    // Now check and get the message
    $message = get_option( 'wc_pre_orders_single_product_message' );

    if ( ! empty( $message ) && is_a( $product, 'WC_Product' ) ) {
    // Check if the product is available for pre-order (use the appropriate method from the plugin)
    if ( WC_Pre_Orders_Product::product_can_be_pre_ordered( $product ) ) {
    // Replace placeholders with actual data if available
    $availability_date = WC_Pre_Orders_Product::get_localized_availability_date( $product );
    $availability_time = WC_Pre_Orders_Product::get_localized_availability_time( $product );

    $message = str_replace( '{availability_date}', $availability_date, $message );
    $message = str_replace( '{availability_time}', $availability_time, $message );

    // Output the sanitized message
    echo '’ . esc_html( $message ) . ”;
    }
    }
    }
    ?>

    Please keep in mind that this is specific to my use case and will most likely require additional modifications for yours. But, I am hoping this is a solid starting point for you!

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.