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
- How to get current product category ID in product archive page
- WooCommerce prices location in DB
- WP/WooCommerce REST API cart/checkout/order [closed]
- Hide Add to Cart Button
- Why do Woocommerce templates use hooks rather than get_template_part
- Display WooCommerce only in stock sizes product attribute on shop page
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Woocommerce Product Price Inserted programmatically doesn’t get displayed In Single Product Page
- How to Order by random on a SQL query
- Hide “Delete Note” link in Order Notes Panel
- Exclude products with a stock lower than the low stock threshold from the shop loop [closed]
- Remove Order List Row Link in WooCommerce Admin?
- wp_customize – detect post type to show/hide customizer options
- WooCommerce – Display nested list of all subcategories on archive-product.php
- Woocommerce REST API – updating an order changes custom tax calculations
- How to list all WC products by their attributes values?
- Showing the WordPress standard text area on a Woocommerce Single Product Page?
- WordPress WooCommerce: How to allow only specified customers to pay by check? [closed]
- WordPress Comment Box on woocommerce product page [closed]
- Can’t remove woocommerce sidebar
- Woocommerce Slow Queries
- How to display the percentage of the applied tax in woocommerce [closed]
- Disabling shopping basket in WooCommerce [closed]
- Should I use docker in wordpress production?
- can’t get the product id in single woocommerce page
- Php echo woocommerce price
- Different files for order details
- Multiple Schema.org markups on a single product page
- Woocommerce – Adding row to cart table
- Hide a product with a certain tag from product-category
- Custom rewrite for product variation not working
- Block Disposable Emails on Woocommerce Registration
- Adding of custom cart item data via Ajax Add to Cart
- WooCommerce show a variation both in check boxes and in a list
- Disable woocommerce product search plugin’s autocomplete [closed]
- Use woocmmerce function on theme and override them
- How to hide order action button after changing order status to completed
- Deregister dequeue JS scripts except on 1 product page
- Woocommerce Rest API: woocommerce_product_invalid_image_id
- How do I disable “Flat Rate” radio button and remain with other shipping method in woocommerce
- How to add woocommerce product price filter widget to other page
- How to send an automatic email to a custom field in Woocommerce order meta 2 weeks after a product is bought
- How does one allow any customer to process any order in store on woocommerce?
- WooCommerce CSV Image URL Creates Additional Images in Media Folder
- Custom changes performed on WP + WooCom site on maintenance subdomain. How to perform a migration to a main domain?
- Woocommerce Child Category Permalink Structure Change
- Allow customer to choose an optional free/paid product to add to their order (and reduce stock reduced & record sale)
- How to restrict type/size of file uploads in any plugin?
- In woocommerce some products have empty options, but how to check this
- Stop the “upload file size” error from printing [closed]
- How to disable the “Upgrade or Downgrade” button in “My account” of WooCommerce Subscriptions
- WooCommerce – Inconsistent Indexing of Orders
- WooCommerce product prices not showing up correctly [closed]
- How to show woocommerce login / registration form in modal
- Which php files, in a WordPress setup, do not need direct web access?