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
- I just want to change my wordpress theme but the problem is with woocommerce . the site is live
- Automatically Append Country Code to Phone Number in WooCommerce Manual Orders (Admin Dashboard)
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- ( Woocommerce) How to get the user belonging to an order? [closed]
- Get the product list of a given Category ID
- List of JS events in the WooCommerce frontend
- get woocommerce My account page link
- WooCommerce: How to edit the get_price_html
- Get woocommerce product price by id [closed]
- Product categories don’t appear as option to build menu
- How do I get WooCommerce to automatically recreate pages? [closed]
- WooCommerce Variable Product Price not showing on single product page
- How to override WooCommerce template files?
- Woocommerce add extra field to variation product
- Getting the gallery images from products in woocommerce?
- How to get current product category ID in product archive page
- Get url of product’s images (woocommerce)
- WooCommerce prices location in DB
- Order by rating not works in wp_query
- Woocommerce: How to remove page-title at the home/shop page but not category pages
- Woocommerce show cross sells on singe product page [closed]
- Can I use Woocommerce to take orders but not handle payment? [closed]
- How to add a new endpoint in woocommerce
- WooCommerce – How to Add a Custom Field to Cart Items and Cart Totals [closed]
- Are there any hook or filter when refund is done through admin -woocommerce
- How to check if is in cart page? [closed]
- Display single product attribute value on Shop page (Woocommerce)
- WP/WooCommerce REST API cart/checkout/order [closed]
- how to use wc_create_order with subscription product
- WooCommerce: Webhook disabled on its own
- Share users and WooCommerce memberships between two installations
- Slow Loading Attribute Select – WooCommerce Backend
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to change or add Woocommerce thank you page URL key content?
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- How to remove an action within a class with extends
- single-product.php template not working for single products [closed]
- Insert variations via woocommerce api [closed]
- WooCommerce get physical store address
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- Correct function to get the user’s latest Woocommerce Subscription?
- WP_Query for WooCommerce Products
- Move payment options at checkout in WooCommerce [closed]
- add_filter to modify woocommerce_cart_item_name hyperlink
- Where do the cart details are stored in database?
- How to display product price of the product in loop
- How to disable Woocommerce password recovery and use the default WordPress password reset page?
- Display order items names in WooCommerce admin orders list [closed]
- Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
- WooCommerce ‘all’ orders no longer being displayed – how may I debug/fix [closed]
- Add custom variable to cart content [closed]
- Get product details by url key in WordPress woocommerce