WooCommerce filtrer ordre etter produkt

Beskrivelse

Har du noen gang ønsket å filtrere resultatene på ordresiden din etter bestemte produkter? Med denne utvidelsen kan du nå det!

Når installert vil a nytt filter vises på skjermen for WooCommerce Ordre, som viser et liste over alle produktene. Velg så bare et produkt og klikk på knappen «Filtrer» for bare å vise ordre som inneholder det produktet.

Denne utvidelsen støtter filtrering av ordre etter:

  • Produktnavn
  • Produktkategori

Note: This plugin is compatible with both WooCommerce’s new HPOS (High-Performance Order Storage) and the legacy WordPress posts storage. Whether you’re using HPOS or the traditional storage method, this plugin will work seamlessly.

Skjermskudd

  • From admin panel, Click on «WooCommerce>Orders» to visit the Orders screen. There you’ll see a new dropdown filter.
  • Click on that dropdown and you’ll see a list of all products. Select a product and click on «Filter» button. It’ll show up the orders which contains only that specific product.

Installasjon

There are three different ways to install this plugin, as well as any other plugin from the WordPress.org repository.

Automatic Installation via WordPress Dashboard

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Plugins > Add New.
  3. Search for «WooCommerce Filter Orders by Product».
  4. Click Install Now next to the plugin.
  5. Once installed, click Activate.

Manual Upload through WordPress Dashboard

  1. Download the «WooCommerce Filter Orders by Product» plugin ZIP file.
  2. Log in to your WordPress admin dashboard.
  3. Navigate to Plugins > Add New.
  4. Click Upload Plugin.
  5. Click Choose File, select the plugin ZIP file you downloaded, and click Install Now.
  6. Once the installation is complete, click Activate Plugin.

Installation via FTP

  1. Download the «WooCommerce Filter Orders by Product» plugin ZIP file and extract it to your computer.
  2. Using an FTP client, connect to your web server.
  3. Navigate to /wp-content/plugins/.
  4. Upload the extracted plugin folder to the /wp-content/plugins/ directory on your server.
  5. Log in to your WordPress admin dashboard.
  6. Naviger til Utvidelser
  7. Finn «WooCommerce filtrer ordre etter produkt» i listen og klikk Aktiver.

After the installation is complete, a new filter will appear on the WooCommerce Orders page.

FAQ

Does this plugin work for all product statuses (public, draft, etc.)?

Currently, this plugin only works for published products. To make it work for all product statuses (e.g., draft, private), add the following code to your theme’s functions.php file:

add_action( 'wfobp_product_status', 'filter_order_by_product_status' );
function filter_order_by_product_status(){
    return 'any';
}

Vurderinger

16. november, 2024
Hi friend, thanks for your plugin! i tried to integrate search by SKU for woo, but then i found your plugin. I did small improvement to your code, so now we can search products by SKUs also, i would like that you will add it to your code, so we’ll not lose it with next update:)i did change in dropdown_fields() functionand replaced your query: public function dropdown_fields() { global $wpdb; $status = apply_filters( ‘wfobp_product_status’, ‘publish’ ); $sql = «SELECT p.ID AS product_id, p.post_title AS product_title, pm.meta_value AS product_sku FROM $wpdb->posts as p LEFT JOIN $wpdb->postmeta as pm ON pm.post_id = p.ID WHERE p.post_type = ‘product’ AND pm.meta_key = ‘_sku'»; $sql .= ( $status == ‘any’ ) ? » : » AND post_status = ‘$status'»; $all_posts = $wpdb->get_results( $sql, ARRAY_A ); $fields = array(); $fields[0] = esc_html__( ‘All Products’, ‘woocommerce-filter-orders-by-product’ ); foreach ( $all_posts as $all_post ) { $fields[ $all_post[’product_id’] ] = $all_post[’product_title’] . ‘(‘ . $all_post[’product_sku’] . ‘)’; } return $fields; } You used select2 search for dropdown, so now we have sku in product name and we easily can search product by typing SKUs in search dropdown 🙂
22. mai, 2024
This plugin does exactly what it says, and good. Very handy and simply a must have. I have made my own (private) plugin depend on this one. Can’t live without it.
2. april, 2021
This plugin is super helpful. I wanted to add a link on a custom admin page to orders for a specific product, and I just had to copy the URL string and add it to a link. Many thanks to the author!
Les alle 15 vurderinger

Bidragsytere og utviklere

“WooCommerce filtrer ordre etter produkt” er programvare med åpen kildekode. Følgende personer har bidratt til denne utvidelsen.

Bidragsytere

“WooCommerce filtrer ordre etter produkt” har blitt oversatt til 10 språk. Takk til oversetterne for deres bidrag.

Oversett “WooCommerce filtrer ordre etter produkt” til ditt språk.

Interessert i utvikling?

Bla gjennom koden, sjekk ut SVN-repositoriet, eller abonner på utviklingsloggen med RSS.

Endringslogg

4.1 – May 20, 2024

  • Tweak: Readme updated

4.0 – Dec 31, 2023

  • Tweak: Added WooCommerce HPOS support

3.3 – Aug 20, 2023

  • Fix: Resolved PHP notice caused by incorrect use of the is_search() function

3.1

  • Readme updated

3.0

  • New: Now it’s possible to filter by Product Category
  • Code refactored

2.0.7

  • Fix: Products with same name only appeared once before

2.0.6

  • Added hook for changing product status

2.0.5

  • Fixed SQL injection bug

2.0.4

  • Improved code

2.0.3

  • Fix: Language

2.0.2

  • Fixed translation bug (Thanks to Kasperta)

2.0.1

  • Fixed a minor bug

2.0.0

  • New: search dropdown
  • Fixed a major bug

1.0.0

  • Initiell utgivelse