in comments I propose to make the order as public but I found a easier way to display a order : with a shortcode
i try this in a plugin :
add_shortcode("view_order", function ($atts, $content = "", $tag) {
if (!isset($_GET["order_id"])) {
return "no id";
}
$order = get_post($_GET["order_id"]);
if ( !isset($order)
|| ("shop_order" !== $order->post_type)
) {
return "no shop_order";
}
// result of the shortcode
ob_start();
echo "<pre>";
print_r($order);
echo "</pre>";
return ob_get_clean();
});
.
then in a page (“preview order” in my exemple) put the shortcode [view_order] and you can see the details of the order on the URL :
http://server/preview-order/?order_id=23
Related Posts:
- Woocommerce change tax rate programmaticly
- How do I get the latest note on the order at woocommerce? [closed]
- Create WooCommerce new order with specific ID
- Woocommerce: Prevent sending of email when order is “Completed”
- How to display empty stars on products with woocommerce?
- Remove the link from the thumbnail and product title on woocommerce
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- WooCommerce quick checkout form? [closed]
- WooCommerce order complete email logic
- WooCommerce orderby template disappears and not longer works on search page
- How to get woocommerce selected variation from order object
- Adjust Price Display for Variable Product in Woocommerce [closed]
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- Cancelled orders move to Trash automatically in Woocommerce – how to disable?
- Can’t Change WooCommerce Default Language to Spanish (Mexico)
- how can i add an additional action into woocommerce admin order page through my plugin?
- Multiple Pricing [closed]
- Link a button to woofunnels model
- Add sub variations in product page
- How to alter taxes amounts when updating an order
- WordPress woocommerce new order email not working
- Woocommerce + Google Analytics (Conversion Rate Not Working)
- Custom Email via Hook only for completed order
- Access custom meta_data in processing order email
- How to select the first product variant as a default?
- Sort products by Sale price and stock status
- Create order actions from custom fields woocommerce
- How to sort products by price ASC and place all no price products to the end? (Woocommerce)
- WordPress Development Workflow
- WooCommerce Stripe Test mode
- how can my customers view their purchased products history like an invoice in a specific page on WordPress
- Change the customer’s name to a link on an order management page
- How to save one API response to WooCommerce order meta data
- Possible to have multiple Authorize.net accounts on the same site?
- Add button linked to single product page on order detail page
- Multiple sorting criteries (order by)
- Woocommerce order_complete email dont send after changing order status via sql
- How to allow registration only from a certain location?
- Conditional email recipient based off Shipping Method [closed]
- If YITH Wishlist page is set to the WooCommerce my-account endpoint, the endpoints stop working all together. Any solution?
- Product atributes in title of order (not in description)
- WooCommerce: Order Details Table > Add Product Meta
- What is the best and cheapest way to generate dashboards about conversions data and store users? [closed]
- Woocommerce admin order email customize – remove product short description
- Critical error on woocommerce checkout page
- Account Status/Login on Main Menu with Avatar Pictures
- How to override the title tag for woocommerce endpoints?
- How to rewrite product permalinks in Woocommerce to use category slugs
- How to re-arrange this hooked content?
- Pre filter woocommerce products to remove a certain category of products
- WooCommerce Stripe Plugin not showing up in settings [closed]
- How to add order status class to the body tag?
- Woocommerce – Change the template?
- Wooocommerce disable check_cart_item_stock if cart item has specific meta
- Force meta data on specific product type
- WooCommerce plaintext mail doesn’t display currency symbol
- Woocommerce, finding the ordinal number of a purchase for a certain product
- WooCommerce: Force coupon for existing/registered customers [closed]
- WooCommerce order refund get qty refunded
- WP/WooCommerce multisite with polylang, product duplication between websites [closed]
- WooCommerce add_to_cart
- WooCommerce Simple Product Options List
- Add custom body tag if product is out of stock
- Functions.php change for Woocommerce not working
- Woocommerce replace product page image with product tabs [closed]
- Woocommerce Register Error
- What to do if images are not displayed in mob. versions of the online store on wordpress?
- WooCommerce (Bookings) + AddOns not always calculating correctly the total
- Woocommerce order proceed hooks
- How can i get the code of Shop Page Woocommerce?
- WooCommerce custom product type not saving with namespaces
- Add shortcode to show woocommerce shipping class name on product template
- Upload file to Woocommerce Order
- wp_login overriding user meta data
- pass a woocommerce product name to contact form7?
- Woocommerce List categories with Image thumbnail
- How to add (and change the font of) the short product description to order page and customer’s new order e-mail [closed]
- Display WOO Commerce products on HTML page?
- How to add custom text field inputs for attributes in backend?
- Get unsolved array keys of product data tabs in woo product editor page
- Show products as posts on archive page
- Woocommerce new shop page
- Add class to latest item Woocommerce
- Replace “Add to cart” by a link to contact page on specific product
- Adding price to woocommerce cart item with get_price gets multiplied with 3?
- email address non required
- Use Product Attribute in conditional tag
- Woocommerce categories displayed on every category and shopping page
- Admin – Custom Post Type in WooCommerce menu – how to control menu order
- Facing issue in Woocommerce 3.3 version in wordpress
- getting attributes in a product loop
- Removing storefront-sorting div from the before section of Shop page
- Update products, terms and relations via SQL
- How to programatically create a WooCommerce downloadable product?
- Custom sender email address for specific WooCommerce product
- Stock QTY gets negative after order
- How do I create a array custom field for use with facetwp.com?
- Get a customer’s phone number by woocommerce
- Insert a custom field as a second email address to a completed order in WooCommerce
- Want to add Number of Products added by each shop manager in users list