Plugin Directory

Changeset 3750789


Ignore:
Timestamp:
10/16/2026 04:27:11 PM (5 weeks ago)
Author:
bigdropgr
Message:

Release 2.0.0: complete rewrite

Location:
totals-report-for-woocommerce/trunk
Files:
63 added
12 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • totals-report-for-woocommerce/trunk/index.php

    r3279294 r3750789  
    11<?php
    2 // Silence is golden.
     2/**
     3 * Silence is golden.
     4 *
     5 * @package BigDrop\TotalsReport
     6 */
  • totals-report-for-woocommerce/trunk/languages/index.php

    r3279294 r3750789  
    11<?php
    2 // Silence is golden.
     2/**
     3 * Silence is golden.
     4 *
     5 * @package BigDrop\TotalsReport
     6 */
  • totals-report-for-woocommerce/trunk/languages/totals-report-for-woocommerce.pot

    r3279294 r3750789  
    1 # Copyright (C) 2024 BigDrop.gr
     1# Copyright (C) 2026 BigDrop.gr
    22# This file is distributed under the GPL-2.0-or-later.
    33msgid ""
    44msgstr ""
    5 "Project-Version: 1.0.2\n"
    6 "Report-Msgid-Bugs-To: https://bigdrop.gr/support\n"
    7 "Last-Translator: BigDrop Team <support@bigdrop.gr>\n"
    8 "Language-Team: Greek <support@bigdrop.gr>\n"
     5"Project-Id-Version: Totals Report for WooCommerce 2.0.0\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/totals-report-for-woocommerce/\n"
     7"Last-Translator: BigDrop.gr\n"
     8"Language-Team: BigDrop.gr\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-04-10T12:00:00+00:00\n"
    13 "PO-Revision-Date: 2024-04-10T12:00:00+00:00\n"
    14 "X-Generator: Poedit\n"
     12"POT-Creation-Date: 2026-10-16T14:23:44+02:00\n"
     13"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: totals-report-for-woocommerce\n"
    16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
    17 
    18 # Admin Menu
     16
     17#. Plugin Name of the plugin
     18#: totals-report-for-woocommerce.php
     19msgid "Totals Report for WooCommerce"
     20msgstr ""
     21
     22#. Plugin URI of the plugin
     23#: totals-report-for-woocommerce.php
     24msgid "https://bigdrop.gr/totals-report-for-woocommerce"
     25msgstr ""
     26
     27#. Description of the plugin
     28#: totals-report-for-woocommerce.php
     29msgid "Stock totals and stock value by category or tag, year-end inventory snapshots, and exports your accountant can open in Excel."
     30msgstr ""
     31
     32#. Author of the plugin
     33#: totals-report-for-woocommerce.php
     34msgid "BigDrop.gr"
     35msgstr ""
     36
     37#. Author URI of the plugin
     38#: totals-report-for-woocommerce.php
     39msgid "https://bigdrop.gr"
     40msgstr ""
     41
     42#: includes/Admin/AdminPage.php:42
     43#: includes/Admin/AdminPage.php:43
     44#: includes/Admin/views/report.php:42
     45#: includes/Admin/views/settings.php:27
     46#: includes/Admin/views/snapshots.php:35
    1947msgid "Totals Report"
    2048msgstr ""
    2149
    22 # Page Titles
    23 msgid "Totals Report for WooCommerce"
    24 msgstr ""
    25 
    26 # Report Sections
    27 msgid "Inventory Totals"
    28 msgstr ""
    29 
    30 msgid "Product Types"
    31 msgstr ""
    32 
    33 msgid "Product Categories"
    34 msgstr ""
    35 
    36 # Export Buttons
    37 msgid "Export Report"
    38 msgstr ""
    39 
    40 msgid "Export as CSV"
    41 msgstr ""
    42 
    43 msgid "Export as JSON"
    44 msgstr ""
    45 
    46 msgid "Export as XML"
    47 msgstr ""
    48 
    49 # Metric Labels
    50 msgid "Total Products"
    51 msgstr ""
    52 
    53 msgid "In Stock Products"
    54 msgstr ""
    55 
    56 msgid "Out of Stock Products"
    57 msgstr ""
    58 
    59 msgid "Low Stock Products"
    60 msgstr ""
    61 
    62 msgid "On Backorder Products"
    63 msgstr ""
    64 
    65 msgid "Variable Products"
    66 msgstr ""
    67 
    68 msgid "Total Variations"
    69 msgstr ""
    70 
    71 msgid "Total Stock Quantity"
    72 msgstr ""
    73 
    74 # Column Headers
    75 msgid "Metric"
    76 msgstr ""
    77 
    78 msgid "Value"
    79 msgstr ""
    80 
    81 msgid "Product Type"
    82 msgstr ""
    83 
    84 msgid "Count"
    85 msgstr ""
    86 
     50#: includes/Admin/AdminPage.php:138
     51#: includes/Admin/PluginsScreen.php:38
     52msgid "Report"
     53msgstr ""
     54
     55#: includes/Admin/AdminPage.php:139
     56#: includes/Admin/views/snapshots.php:119
     57msgid "Snapshots"
     58msgstr ""
     59
     60#: includes/Admin/AdminPage.php:140
     61#: includes/Admin/PluginsScreen.php:39
     62msgid "Settings"
     63msgstr ""
     64
     65#: includes/Admin/AdminPage.php:142
     66msgid "Totals Report sections"
     67msgstr ""
     68
     69#: includes/Admin/DashboardWidget.php:131
     70msgid "Stock at a glance"
     71msgstr ""
     72
     73#. translators: %s: technical error message
     74#: includes/Admin/DashboardWidget.php:156
     75#: includes/Admin/ReportView.php:54
     76#, php-format
     77msgid "The report could not be calculated: %s"
     78msgstr ""
     79
     80#. translators: %s: a number
     81#: includes/Admin/Format.php:107
     82#: includes/Admin/Format.php:118
     83#, php-format
     84msgid "%s%%"
     85msgstr ""
     86
     87#. translators: date and time format for snapshots, see https://www.php.net/manual/datetime.format.php
     88#: includes/Admin/Format.php:129
     89msgid "j M Y, H:i"
     90msgstr ""
     91
     92#. translators: long date and time format, see https://www.php.net/manual/datetime.format.php
     93#: includes/Admin/Format.php:140
     94msgid "j F Y \\a\\t H:i"
     95msgstr ""
     96
     97#: includes/Admin/Format.php:150
     98msgid "In stock"
     99msgstr ""
     100
     101#: includes/Admin/Format.php:151
     102msgid "Low stock"
     103msgstr ""
     104
     105#: includes/Admin/Format.php:152
     106msgid "On backorder"
     107msgstr ""
     108
     109#: includes/Admin/Format.php:153
     110msgid "Out of stock"
     111msgstr ""
     112
     113#: includes/Admin/Format.php:154
     114msgid "Not managed"
     115msgstr ""
     116
     117#: includes/Admin/PluginsScreen.php:56
     118msgid "Support"
     119msgstr ""
     120
     121#: includes/Admin/PluginsScreen.php:57
     122msgid "Documentation"
     123msgstr ""
     124
     125#: includes/Admin/ReportView.php:43
     126#: includes/Export/ExportController.php:80
     127msgid "This snapshot does not exist or is not complete yet."
     128msgstr ""
     129
     130#: includes/Admin/ReportView.php:188
     131msgid "At or below their low-stock threshold"
     132msgstr ""
     133
     134#: includes/Admin/ReportView.php:190
     135msgid "Above their low-stock threshold"
     136msgstr ""
     137
     138#. translators: %s: number of stock items
     139#: includes/Admin/ReportView.php:194
     140#, php-format
     141msgid "Ordered beyond stock · %s item below zero"
     142msgid_plural "Ordered beyond stock · %s items below zero"
     143msgstr[0] ""
     144msgstr[1] ""
     145
     146#: includes/Admin/ReportView.php:198
     147msgid "Nothing left to sell"
     148msgstr ""
     149
     150#: includes/Admin/ReportView.php:200
     151msgid "Stock not tracked, so units count as 0"
     152msgstr ""
     153
     154#. translators: %s: number of products
     155#: includes/Admin/ReportView.php:205
     156#, php-format
     157msgid "%s grouped or external product left out"
     158msgid_plural "%s grouped and external products left out"
     159msgstr[0] ""
     160msgstr[1] ""
     161
     162#: includes/Admin/ReportView.php:209
     163msgid "A variable product counts once"
     164msgstr ""
     165
     166#. translators: %s: average number of units
     167#: includes/Admin/ReportView.php:225
     168#, php-format
     169msgid "About %s unit per product"
     170msgid_plural "About %s units per product"
     171msgstr[0] ""
     172msgstr[1] ""
     173
     174#. translators: %s: number of products
     175#: includes/Admin/ReportView.php:231
     176#, php-format
     177msgid "Across %s product with managed stock"
     178msgid_plural "Across %s products with managed stock"
     179msgstr[0] ""
     180msgstr[1] ""
     181
     182#: includes/Admin/ReportView.php:243
     183#: includes/Admin/views/report.php:185
     184msgid "All products"
     185msgstr ""
     186
     187#. translators: 1: minimum units, 2: maximum units
     188#: includes/Admin/ReportView.php:259
     189#, php-format
     190msgid "%1$s–%2$s unit"
     191msgid_plural "%1$s–%2$s units"
     192msgstr[0] ""
     193msgstr[1] ""
     194
     195#. translators: %s: minimum units
     196#: includes/Admin/ReportView.php:263
     197#, php-format
     198msgid "at least %s unit"
     199msgid_plural "at least %s units"
     200msgstr[0] ""
     201msgstr[1] ""
     202
     203#. translators: %s: maximum units
     204#: includes/Admin/ReportView.php:266
     205#, php-format
     206msgid "up to %s unit"
     207msgid_plural "up to %s units"
     208msgstr[0] ""
     209msgstr[1] ""
     210
     211#: includes/Admin/SettingsController.php:41
     212msgid "Settings saved, except:"
     213msgstr ""
     214
     215#: includes/Admin/SettingsController.php:43
     216msgid "Settings saved."
     217msgstr ""
     218
     219#. translators: %s: time
     220#: includes/Admin/SnapshotsView.php:62
     221#, php-format
     222msgid "Today, %s"
     223msgstr ""
     224
     225#: includes/Admin/SnapshotsView.php:75
     226msgid "Scheduled"
     227msgstr ""
     228
     229#: includes/Admin/SnapshotsView.php:78
     230msgid "Unknown user"
     231msgstr ""
     232
     233#: includes/Admin/SnapshotsView.php:90
     234msgid "Year-end inventory count."
     235msgstr ""
     236
     237#: includes/Admin/SnapshotsView.php:94
     238msgid "Also taken at the end of each month."
     239msgstr ""
     240
     241#: includes/Admin/SnapshotsView.php:94
     242msgid "Taken at the end of each month."
     243msgstr ""
     244
     245#: includes/Admin/SnapshotsView.php:96
     246msgid "Also taken at the end of each quarter."
     247msgstr ""
     248
     249#: includes/Admin/SnapshotsView.php:96
     250msgid "Taken at the end of each quarter."
     251msgstr ""
     252
     253#. translators: %s: timezone name, e.g. Athens
     254#: includes/Admin/SnapshotsView.php:99
     255#, php-format
     256msgid "Times follow the site timezone (%s)."
     257msgstr ""
     258
     259#. translators: %s: number of stock items
     260#: includes/Admin/SnapshotsView.php:111
     261#, php-format
     262msgid "Running… %s item so far"
     263msgid_plural "Running… %s items so far"
     264msgstr[0] ""
     265msgstr[1] ""
     266
     267#. translators: %s: number of snapshots
     268#: includes/Admin/SnapshotsView.php:145
     269#, php-format
     270msgid "%s kept"
     271msgid_plural "%s kept"
     272msgstr[0] ""
     273msgstr[1] ""
     274
     275#. translators: short date format, see https://www.php.net/manual/datetime.format.php
     276#: includes/Admin/SnapshotsView.php:149
     277#: includes/Admin/views/settings.php:193
     278msgid "j M Y"
     279msgstr ""
     280
     281#. translators: %s: date
     282#: includes/Admin/SnapshotsView.php:151
     283#, php-format
     284msgid "oldest %s"
     285msgstr ""
     286
     287#: includes/Admin/SnapshotsView.php:155
     288msgid "kept until you delete them"
     289msgstr ""
     290
     291#. translators: %s: number of years
     292#: includes/Admin/SnapshotsView.php:157
     293#, php-format
     294msgid "kept for %s year"
     295msgid_plural "kept for %s years"
     296msgstr[0] ""
     297msgstr[1] ""
     298
     299#: includes/Admin/views/missing-cost.php:29
     300msgid "Products without cost"
     301msgstr ""
     302
     303#: includes/Admin/views/missing-cost.php:30
     304msgid "These products have units in stock but no cost in WooCommerce, so they are left out of the value at cost."
     305msgstr ""
     306
     307#: includes/Admin/views/missing-cost.php:35
     308msgid "Back to the report"
     309msgstr ""
     310
     311#. translators: %s: snapshot date and time
     312#: includes/Admin/views/missing-cost.php:48
     313#: includes/Admin/views/report.php:125
     314#, php-format
     315msgid "You are viewing the snapshot of %s"
     316msgstr ""
     317
     318#: includes/Admin/views/missing-cost.php:50
     319msgid "Edit opens the product as it is today."
     320msgstr ""
     321
     322#: includes/Admin/views/missing-cost.php:52
     323#: includes/Admin/views/report.php:130
     324msgid "Back to live report"
     325msgstr ""
     326
     327#. translators: %s: number of products
     328#: includes/Admin/views/missing-cost.php:63
     329#, php-format
     330msgid "%s product without cost"
     331msgid_plural "%s products without cost"
     332msgstr[0] ""
     333msgstr[1] ""
     334
     335#: includes/Admin/views/missing-cost.php:66
     336msgid "Sorted by units, high to low"
     337msgstr ""
     338
     339#: includes/Admin/views/missing-cost.php:71
     340#: includes/Admin/views/report.php:217
     341msgid "Every product with units in stock has a cost."
     342msgstr ""
     343
     344#: includes/Admin/views/missing-cost.php:78
     345#: includes/Export/InventoryList.php:89
     346msgid "Product"
     347msgstr ""
     348
     349#: includes/Admin/views/missing-cost.php:79
     350#: includes/Export/InventoryList.php:88
     351msgid "SKU"
     352msgstr ""
     353
     354#: includes/Admin/views/missing-cost.php:80
     355msgid "Type"
     356msgstr ""
     357
     358#: includes/Admin/views/missing-cost.php:81
     359#: includes/Admin/views/report-table.php:35
     360#: includes/Admin/views/report-table.php:67
     361#: includes/Admin/views/snapshots.php:137
     362#: includes/Export/ExportController.php:221
     363#: includes/Export/InventoryList.php:96
     364msgid "Units"
     365msgstr ""
     366
     367#: includes/Admin/views/missing-cost.php:82
     368#: includes/Admin/views/snapshots.php:140
     369msgid "Actions"
     370msgstr ""
     371
     372#: includes/Admin/views/missing-cost.php:91
     373msgid "Shared stock"
     374msgstr ""
     375
     376#: includes/Admin/views/missing-cost.php:100
     377msgid "Edit"
     378msgstr ""
     379
     380#: includes/Admin/views/missing-cost.php:111
     381msgid "Pages"
     382msgstr ""
     383
     384#: includes/Admin/views/missing-cost.php:120
     385msgid "Previous"
     386msgstr ""
     387
     388#: includes/Admin/views/missing-cost.php:121
     389msgid "Next"
     390msgstr ""
     391
     392#: includes/Admin/views/report-table.php:33
     393#: includes/Admin/views/report-table.php:63
     394#: includes/Export/ExportController.php:217
     395msgid "Tag"
     396msgstr ""
     397
     398#: includes/Admin/views/report-table.php:33
     399#: includes/Admin/views/report-table.php:62
     400#: includes/Email/views/email-html.php:47
     401#: includes/Export/ExportController.php:217
    87402msgid "Category"
    88403msgstr ""
    89404
    90 msgid "Product Count"
    91 msgstr ""
    92 
    93 msgid "In Stock"
    94 msgstr ""
    95 
    96 msgid "Out of Stock"
    97 msgstr ""
    98 
    99 msgid "Low Stock"
    100 msgstr ""
    101 
    102 msgid "On Backorder"
    103 msgstr ""
    104 
    105 # Pagination
    106 msgid "Number of items per page:"
    107 msgstr ""
    108 
     405#: includes/Admin/views/report-table.php:34
     406#: includes/Admin/views/report.php:199
     407#: includes/Admin/views/snapshots.php:136
     408#: includes/Admin/views/widget.php:26
     409#: includes/Email/EmailReport.php:271
     410#: includes/Export/ExportController.php:220
     411msgid "Products"
     412msgstr ""
     413
     414#: includes/Admin/views/report-table.php:36
     415#: includes/Email/EmailReport.php:302
     416#: includes/Email/views/email-html.php:36
     417#: includes/Export/InventoryList.php:94
     418msgid "Stock status"
     419msgstr ""
     420
     421#: includes/Admin/views/report-table.php:37
     422#: includes/Admin/views/snapshots.php:138
     423#: includes/Admin/views/widget.php:35
     424#: includes/Export/ExportController.php:227
     425#: includes/Export/InventoryList.php:100
     426msgid "Value at cost"
     427msgstr ""
     428
     429#: includes/Admin/views/report-table.php:38
     430#: includes/Admin/views/snapshots.php:139
     431#: includes/Admin/views/widget.php:40
     432#: includes/Email/views/email-html.php:48
     433#: includes/Export/ExportController.php:230
     434#: includes/Export/InventoryList.php:103
     435msgid "Value at retail"
     436msgstr ""
     437
     438#: includes/Admin/views/report-table.php:39
     439#: includes/Email/views/email-html.php:49
     440msgid "Share"
     441msgstr ""
     442
     443#: includes/Admin/views/report-table.php:45
     444msgid "Products without a tag are in No tag · Sorted by value at retail"
     445msgstr ""
     446
     447#: includes/Admin/views/report-table.php:45
     448msgid "Totals include subcategories · Sorted by value at retail"
     449msgstr ""
     450
     451#. translators: %s: stock status such as "Low stock"
     452#: includes/Admin/views/report-table.php:47
     453#, php-format
     454msgid "%s products only · Totals include subcategories"
     455msgstr ""
     456
     457#. translators: %s: stock status such as "Low stock"
     458#: includes/Admin/views/report-table.php:50
     459#, php-format
     460msgid "%s products only"
     461msgstr ""
     462
     463#: includes/Admin/views/report-table.php:56
     464msgid "By tag"
     465msgstr ""
     466
     467#: includes/Admin/views/report-table.php:56
     468msgid "By category"
     469msgstr ""
     470
     471#: includes/Admin/views/report-table.php:60
     472msgid "Group rows by"
     473msgstr ""
     474
     475#: includes/Admin/views/report-table.php:65
     476#: includes/Admin/views/report.php:204
     477#: includes/Admin/views/widget.php:30
     478#: includes/Email/EmailReport.php:272
     479msgid "Units in stock"
     480msgstr ""
     481
     482#: includes/Admin/views/report-table.php:68
     483msgid "min"
     484msgstr ""
     485
     486#: includes/Admin/views/report-table.php:70
     487msgid "Units up to"
     488msgstr ""
     489
     490#: includes/Admin/views/report-table.php:71
     491msgid "max"
     492msgstr ""
     493
     494#: includes/Admin/views/report-table.php:72
    109495msgid "Apply"
    110496msgstr ""
    111497
    112 msgid "%s items"
    113 msgstr ""
    114 
    115 msgid "&laquo;"
    116 msgstr ""
    117 
    118 msgid "&raquo;"
    119 msgstr ""
    120 
    121 # Error Messages
    122 msgid "You do not have sufficient permissions to export reports."
    123 msgstr ""
    124 
    125 msgid "Export Error"
    126 msgstr ""
    127 
    128 msgid "Invalid export format."
    129 msgstr ""
    130 
    131 # Plugin Notices
    132 msgid "Totals Report for WooCommerce cannot be activated because it requires the WooCommerce plugin to be installed and active."
    133 msgstr ""
    134 
    135 msgid "This plugin cannot be activated because required plugins are missing or inactive."
    136 msgstr ""
    137 
    138 msgid "Totals Report for WooCommerce: Unable to load required classes. Please check your plugin installation."
    139 msgstr ""
    140 
    141 msgid "Totals Report for WooCommerce requires WooCommerce to be installed and active. Please install and activate WooCommerce first, then activate this plugin."
    142 msgstr ""
    143 
    144 msgid "Requires:"
    145 msgstr ""
     498#: includes/Admin/views/report-table.php:76
     499#: includes/Admin/views/report-table.php:77
     500msgid "Search tags"
     501msgstr ""
     502
     503#: includes/Admin/views/report-table.php:76
     504#: includes/Admin/views/report-table.php:77
     505msgid "Search categories"
     506msgstr ""
     507
     508#: includes/Admin/views/report-table.php:84
     509msgid "No products match this filter"
     510msgstr ""
     511
     512#: includes/Admin/views/report-table.php:85
     513msgid "Clear filter"
     514msgstr ""
     515
     516#: includes/Admin/views/report-table.php:112
     517#: includes/Export/ExportController.php:170
     518msgid "No tag"
     519msgstr ""
     520
     521#: includes/Admin/views/report-table.php:112
     522#: includes/Export/ExportController.php:170
     523msgid "No category"
     524msgstr ""
     525
     526#. translators: %s: category name
     527#: includes/Admin/views/report-table.php:130
     528#, php-format
     529msgid "Collapse %s"
     530msgstr ""
     531
     532#. translators: %s: category name
     533#: includes/Admin/views/report-table.php:130
     534#, php-format
     535msgid "Expand %s"
     536msgstr ""
     537
     538#. translators: %s: number of products
     539#: includes/Admin/views/report-table.php:152
     540#, php-format
     541msgid "%s without cost"
     542msgid_plural "%s without cost"
     543msgstr[0] ""
     544msgstr[1] ""
     545
     546#: includes/Admin/views/report-table.php:165
     547msgid "No rows match your search."
     548msgstr ""
     549
     550#. translators: %s: number of tags
     551#: includes/Admin/views/report-table.php:175
     552#, php-format
     553msgid "%s tag"
     554msgid_plural "%s tags"
     555msgstr[0] ""
     556msgstr[1] ""
     557
     558#. translators: 1: number of top-level categories, 2: number of all categories
     559#: includes/Admin/views/report-table.php:181
     560#, php-format
     561msgid "%1$s top-level category · %2$s in total"
     562msgid_plural "%1$s top-level categories · %2$s in total"
     563msgstr[0] ""
     564msgstr[1] ""
     565
     566#: includes/Admin/views/report-table.php:192
     567msgid "Names are not linked here: the WooCommerce product list shows today’s stock, not this snapshot. Download its inventory list from the Snapshots tab."
     568msgstr ""
     569
     570#: includes/Admin/views/report-table.php:194
     571msgid "Select a tag to open those products in WooCommerce."
     572msgstr ""
     573
     574#: includes/Admin/views/report-table.php:196
     575msgid "Select a category to open those products in WooCommerce."
     576msgstr ""
     577
     578#: includes/Admin/views/report-table.php:200
     579msgid "WooCommerce has no filter for this status, so the list shows all its in-stock products."
     580msgstr ""
     581
     582#: includes/Admin/views/report.php:45
     583msgid "Stock totals by tag"
     584msgstr ""
     585
     586#: includes/Admin/views/report.php:45
     587msgid "Stock totals by category"
     588msgstr ""
     589
     590#. translators: 1: "Stock totals by category", 2: snapshot date and time
     591#: includes/Admin/views/report.php:48
     592#, php-format
     593msgid "%1$s · Snapshot of %2$s"
     594msgstr ""
     595
     596#. translators: 1: "Stock totals by category", 2: time, 3: seconds
     597#: includes/Admin/views/report.php:53
     598#, php-format
     599msgid "%1$s · Calculated today at %2$s in %3$s s"
     600msgstr ""
     601
     602#: includes/Admin/views/report.php:67
     603msgid "Refresh"
     604msgstr ""
     605
     606#: includes/Admin/views/report.php:74
     607msgid "Export"
     608msgstr ""
     609
     610#: includes/Admin/views/report.php:77
     611msgid "Export format"
     612msgstr ""
     613
     614#: includes/Admin/views/report.php:80
     615msgid "Spreadsheet"
     616msgstr ""
     617
     618#: includes/Admin/views/report.php:80
     619msgid "Opens in Excel, Greek text included"
     620msgstr ""
     621
     622#: includes/Admin/views/report.php:81
     623msgid "Data file"
     624msgstr ""
     625
     626#: includes/Admin/views/report.php:81
     627msgid "For scripts and integrations"
     628msgstr ""
     629
     630#: includes/Admin/views/report.php:82
     631msgid "Structured file"
     632msgstr ""
     633
     634#: includes/Admin/views/report.php:82
     635msgid "For ERP and accounting imports"
     636msgstr ""
     637
     638#: includes/Admin/views/report.php:91
     639msgid "Per product"
     640msgstr ""
     641
     642#: includes/Admin/views/report.php:94
     643#: includes/Admin/views/snapshots.php:184
     644msgid "Inventory list"
     645msgstr ""
     646
     647#: includes/Admin/views/report.php:94
     648msgid "Every product with SKU, units and unit cost"
     649msgstr ""
     650
     651#. translators: 1: view name such as "Low stock", 2: number of products
     652#: includes/Admin/views/report.php:101
     653#, php-format
     654msgid "Exports what you see now: %1$s · %2$s product"
     655msgid_plural "Exports what you see now: %1$s · %2$s products"
     656msgstr[0] ""
     657msgstr[1] ""
     658
     659#: includes/Admin/views/report.php:108
     660msgid "The inventory list always covers all products."
     661msgstr ""
     662
     663#: includes/Admin/views/report.php:138
     664msgid "Stock management is turned off in WooCommerce, so only Not managed, Out of stock and On backorder can appear, and units count as 0."
     665msgstr ""
     666
     667#. translators: %s: number of products and variations
     668#: includes/Admin/views/report.php:151
     669#, php-format
     670msgid "%s product or variation is missing from the WooCommerce product lookup table, so it was read more slowly."
     671msgid_plural "%s products and variations are missing from the WooCommerce product lookup table, so they were read more slowly."
     672msgstr[0] ""
     673msgstr[1] ""
     674
     675#: includes/Admin/views/report.php:156
     676msgid "The WooCommerce product lookup table looks out of date, so some totals may be off."
     677msgstr ""
     678
     679#: includes/Admin/views/report.php:159
     680msgid "Regenerate the product lookup tables in WooCommerce › Status › Tools"
     681msgstr ""
     682
     683#: includes/Admin/views/report.php:166
     684msgid "No products yet"
     685msgstr ""
     686
     687#: includes/Admin/views/report.php:167
     688msgid "Add products in WooCommerce to see totals here."
     689msgstr ""
     690
     691#: includes/Admin/views/report.php:169
     692msgid "Grouped and external products are left out because they hold no stock of their own."
     693msgstr ""
     694
     695#: includes/Admin/views/report.php:172
     696msgid "Add a product"
     697msgstr ""
     698
     699#: includes/Admin/views/report.php:183
     700msgid "Show"
     701msgstr ""
     702
     703#: includes/Admin/views/report.php:210
     704#: includes/Admin/views/report.php:233
     705#: includes/Email/EmailReport.php:275
     706msgid "Stock value at cost"
     707msgstr ""
     708
     709#: includes/Admin/views/report.php:215
     710msgid "No products with units in stock."
     711msgstr ""
     712
     713#. translators: %s: percentage
     714#: includes/Admin/views/report.php:220
     715#, php-format
     716msgid "%s of products have a cost."
     717msgstr ""
     718
     719#. translators: %s: number of products
     720#: includes/Admin/views/report.php:225
     721#, php-format
     722msgid "Review %s product without cost"
     723msgid_plural "Review %s products without cost"
     724msgstr[0] ""
     725msgstr[1] ""
     726
     727#: includes/Admin/views/report.php:235
     728msgid "Turn on Cost of Goods Sold in WooCommerce to see what your stock cost you, per category."
     729msgstr ""
     730
     731#: includes/Admin/views/report.php:236
     732msgid "Open WooCommerce settings"
     733msgstr ""
     734
     735#: includes/Admin/views/report.php:238
     736msgid "Update WooCommerce to use Cost of Goods Sold and see what your stock cost you, per category."
     737msgstr ""
     738
     739#: includes/Admin/views/report.php:243
     740#: includes/Email/EmailReport.php:277
     741msgid "Stock value at retail"
     742msgstr ""
     743
     744#: includes/Admin/views/report.php:245
     745msgid "Regular price × units in stock"
     746msgstr ""
     747
     748#: includes/Admin/views/report.php:245
     749msgid "Current price × units in stock"
     750msgstr ""
     751
     752#: includes/Admin/views/report.php:251
     753msgid "Stock status across the store"
     754msgstr ""
     755
     756#. translators: %s: number of products
     757#: includes/Admin/views/report.php:255
     758#, php-format
     759msgid "Each product counts once, so the five add up to %s"
     760msgid_plural "Each product counts once, so the five add up to %s"
     761msgstr[0] ""
     762msgstr[1] ""
     763
     764#. translators: %s: number of stock items
     765#: includes/Admin/views/report.php:271
     766#, php-format
     767msgid "%s item below zero"
     768msgid_plural "%s items below zero"
     769msgstr[0] ""
     770msgstr[1] ""
     771
     772#: includes/Admin/views/report.php:285
     773msgid "Products with more than one tag count in each, so tag rows can add up to more than the store total. Products without a tag are in the No tag row."
     774msgstr ""
     775
     776#: includes/Admin/views/report.php:287
     777msgid "Products in more than one category count in each, so category rows can add up to more than the store total. Parent categories include their subcategories without counting a product twice."
     778msgstr ""
     779
     780#: includes/Admin/views/report.php:290
     781msgid "Grouped and external products are left out because they hold no stock of their own. Variations count one by one towards units and value; variations that share the stock of their product count once."
     782msgstr ""
     783
     784#: includes/Admin/views/report.php:293
     785msgid "Only published products are counted."
     786msgstr ""
     787
     788#: includes/Admin/views/settings.php:28
     789msgid "Schedules, email report, how stock is valued and how files are exported"
     790msgstr ""
     791
     792#: includes/Admin/views/settings.php:41
     793msgid "Inventory snapshots"
     794msgstr ""
     795
     796#: includes/Admin/views/settings.php:42
     797msgid "Freeze units, costs and prices at set moments, so your year-end count matches what the shop held that night."
     798msgstr ""
     799
     800#: includes/Admin/views/settings.php:46
     801msgid "Take a snapshot automatically"
     802msgstr ""
     803
     804#: includes/Admin/views/settings.php:47
     805msgid "At year end — 31 December, 23:59"
     806msgstr ""
     807
     808#: includes/Admin/views/settings.php:48
     809msgid "At the end of each quarter"
     810msgstr ""
     811
     812#: includes/Admin/views/settings.php:49
     813msgid "At the end of each month"
     814msgstr ""
     815
     816#. translators: %s: timezone, e.g. Europe/Athens
     817#: includes/Admin/views/settings.php:54
     818#, php-format
     819msgid "Times follow the site timezone: %s."
     820msgstr ""
     821
     822#: includes/Admin/views/settings.php:58
     823#: includes/Settings.php:138
     824msgid "Keep snapshots"
     825msgstr ""
     826
     827#: includes/Admin/views/settings.php:70
     828msgid "Email report"
     829msgstr ""
     830
     831#: includes/Admin/views/settings.php:71
     832msgid "A short summary of stock and value, sent on a schedule to you or your accountant."
     833msgstr ""
     834
     835#: includes/Admin/views/settings.php:74
     836msgid "Send the stock report by email"
     837msgstr ""
     838
     839#: includes/Admin/views/settings.php:78
     840#: includes/Settings.php:139
     841msgid "How often"
     842msgstr ""
     843
     844#: includes/Admin/views/settings.php:80
     845msgid "Weekly"
     846msgstr ""
     847
     848#: includes/Admin/views/settings.php:81
     849msgid "Monthly"
     850msgstr ""
     851
     852#: includes/Admin/views/settings.php:85
     853msgid "Day"
     854msgstr ""
     855
     856#: includes/Admin/views/settings.php:91
     857msgid "Weekly reports only. Monthly reports go out on the 1st."
     858msgstr ""
     859
     860#: includes/Admin/views/settings.php:94
     861msgid "Time"
     862msgstr ""
     863
     864#: includes/Admin/views/settings.php:99
     865msgid "Send to"
     866msgstr ""
     867
     868#: includes/Admin/views/settings.php:101
     869msgid "Separate addresses with commas."
     870msgstr ""
     871
     872#: includes/Admin/views/settings.php:103
     873msgid "Attach the inventory list (CSV)"
     874msgstr ""
     875
     876#: includes/Admin/views/settings.php:105
     877msgid "Send a test email now"
     878msgstr ""
     879
     880#: includes/Admin/views/settings.php:114
     881msgid "Stock value"
     882msgstr ""
     883
     884#: includes/Admin/views/settings.php:115
     885msgid "How the report puts a value on your stock."
     886msgstr ""
     887
     888#: includes/Admin/views/settings.php:119
     889#: includes/Settings.php:140
     890msgid "Value at retail uses"
     891msgstr ""
     892
     893#: includes/Admin/views/settings.php:120
     894msgid "The current price — the sale price while a sale runs"
     895msgstr ""
     896
     897#: includes/Admin/views/settings.php:121
     898msgid "The regular price"
     899msgstr ""
     900
     901#: includes/Admin/views/settings.php:124
     902#: includes/Settings.php:141
     903msgid "Products counted"
     904msgstr ""
     905
     906#: includes/Admin/views/settings.php:125
     907msgid "All products except those in the trash — drafts, pending, private and scheduled too"
     908msgstr ""
     909
     910#: includes/Admin/views/settings.php:126
     911msgid "Published products only"
     912msgstr ""
     913
     914#: includes/Admin/views/settings.php:127
     915msgid "Physical stock exists whether or not a product is published, so the inventory count includes drafts by default. Grouped and external products are never counted."
     916msgstr ""
     917
     918#: includes/Admin/views/settings.php:131
     919msgid "Cost of Goods Sold is on"
     920msgstr ""
     921
     922#. translators: 1: products with a cost, 2: products with units in stock
     923#: includes/Admin/views/settings.php:136
     924#, php-format
     925msgid "%1$s of %2$s product with units in stock has a cost."
     926msgid_plural "%1$s of %2$s products with units in stock have a cost."
     927msgstr[0] ""
     928msgstr[1] ""
     929
     930#. translators: %s: number of products
     931#: includes/Admin/views/settings.php:143
     932#, php-format
     933msgid "Show the %s product without cost"
     934msgid_plural "Show the %s products without cost"
     935msgstr[0] ""
     936msgstr[1] ""
     937
     938#: includes/Admin/views/settings.php:149
     939msgid "Cost of Goods Sold is off"
     940msgstr ""
     941
     942#: includes/Admin/views/settings.php:151
     943msgid "Turn it on in WooCommerce › Settings › Advanced › Features"
     944msgstr ""
     945
     946#: includes/Admin/views/settings.php:153
     947msgid "This WooCommerce version does not have Cost of Goods Sold yet."
     948msgstr ""
     949
     950#: includes/Admin/views/settings.php:162
     951msgid "Exports"
     952msgstr ""
     953
     954#: includes/Admin/views/settings.php:163
     955msgid "Make CSV files open correctly in Excel in your language."
     956msgstr ""
     957
     958#: includes/Admin/views/settings.php:166
     959#: includes/Settings.php:142
     960msgid "CSV column separator"
     961msgstr ""
     962
     963#: includes/Admin/views/settings.php:168
     964msgid "Automatic — semicolon where the decimal mark is a comma (Greek, German…)"
     965msgstr ""
     966
     967#: includes/Admin/views/settings.php:169
     968msgid "Comma"
     969msgstr ""
     970
     971#: includes/Admin/views/settings.php:170
     972msgid "Semicolon"
     973msgstr ""
     974
     975#: includes/Admin/views/settings.php:172
     976msgid "Files are saved as UTF-8 so Greek product names show correctly."
     977msgstr ""
     978
     979#: includes/Admin/views/settings.php:178
     980msgid "Dashboard and data"
     981msgstr ""
     982
     983#: includes/Admin/views/settings.php:179
     984msgid "Where the report shows up, and what happens to your data if you remove the plugin."
     985msgstr ""
     986
     987#: includes/Admin/views/settings.php:182
     988msgid "Show the stock widget on the WordPress Dashboard"
     989msgstr ""
     990
     991#: includes/Admin/views/settings.php:183
     992msgid "Delete snapshots and settings when the plugin is deleted"
     993msgstr ""
     994
     995#: includes/Admin/views/settings.php:183
     996msgid "Leave this off if you may need past snapshots for your accountant."
     997msgstr ""
     998
     999#: includes/Admin/views/settings.php:188
     1000msgid "Save changes"
     1001msgstr ""
     1002
     1003#. translators: %s: date
     1004#: includes/Admin/views/settings.php:195
     1005#, php-format
     1006msgid "Last saved %s"
     1007msgstr ""
     1008
     1009#: includes/Admin/views/snapshots.php:36
     1010msgid "Frozen copies of your stock, quantities and values for inventory counts"
     1011msgstr ""
     1012
     1013#: includes/Admin/views/snapshots.php:41
     1014msgid "Label for the snapshot (optional)"
     1015msgstr ""
     1016
     1017#: includes/Admin/views/snapshots.php:42
     1018msgid "Label (optional)"
     1019msgstr ""
     1020
     1021#: includes/Admin/views/snapshots.php:45
     1022msgid "Take snapshot now"
     1023msgstr ""
     1024
     1025#. translators: 1: number of products with its word, 2: number of units with its word
     1026#: includes/Admin/views/snapshots.php:61
     1027#, php-format
     1028msgid "Snapshot taken: %1$s, %2$s. It will not change when your stock does."
     1029msgstr ""
     1030
     1031#. translators: %s: number of products
     1032#: includes/Admin/views/snapshots.php:63
     1033#, php-format
     1034msgid "%s product"
     1035msgid_plural "%s products"
     1036msgstr[0] ""
     1037msgstr[1] ""
     1038
     1039#. translators: %s: number of units
     1040#: includes/Admin/views/snapshots.php:65
     1041#, php-format
     1042msgid "%s unit"
     1043msgid_plural "%s units"
     1044msgstr[0] ""
     1045msgstr[1] ""
     1046
     1047#: includes/Admin/views/snapshots.php:74
     1048msgid "Taking the snapshot. Large stores take a few minutes; it continues in the background and this page updates by itself."
     1049msgstr ""
     1050
     1051#. translators: %s: snapshot date
     1052#: includes/Admin/views/snapshots.php:87
     1053#: includes/Admin/views/snapshots.php:217
     1054#, php-format
     1055msgid "Delete the snapshot of %s? This cannot be undone."
     1056msgstr ""
     1057
     1058#: includes/Admin/views/snapshots.php:90
     1059msgid "Delete snapshot"
     1060msgstr ""
     1061
     1062#: includes/Admin/views/snapshots.php:91
     1063#: includes/Admin/views/snapshots.php:234
     1064msgid "Cancel"
     1065msgstr ""
     1066
     1067#. translators: %s: date and time
     1068#: includes/Admin/views/snapshots.php:103
     1069#, php-format
     1070msgid "Next automatic snapshot: %s"
     1071msgstr ""
     1072
     1073#: includes/Admin/views/snapshots.php:108
     1074msgid "No automatic snapshots are scheduled"
     1075msgstr ""
     1076
     1077#: includes/Admin/views/snapshots.php:109
     1078msgid "Turn on the year-end snapshot in Settings so your inventory count is taken on 31 December at 23:59."
     1079msgstr ""
     1080
     1081#: includes/Admin/views/snapshots.php:113
     1082msgid "Change schedule"
     1083msgstr ""
     1084
     1085#: includes/Admin/views/snapshots.php:125
     1086msgid "No snapshots yet"
     1087msgstr ""
     1088
     1089#: includes/Admin/views/snapshots.php:126
     1090msgid "Take your first snapshot or wait for the year-end one on 31 December."
     1091msgstr ""
     1092
     1093#: includes/Admin/views/snapshots.php:133
     1094msgid "Taken"
     1095msgstr ""
     1096
     1097#: includes/Admin/views/snapshots.php:134
     1098msgid "Label"
     1099msgstr ""
     1100
     1101#: includes/Admin/views/snapshots.php:135
     1102msgid "By"
     1103msgstr ""
     1104
     1105#: includes/Admin/views/snapshots.php:154
     1106msgid "Year-end"
     1107msgstr ""
     1108
     1109#: includes/Admin/views/snapshots.php:157
     1110msgid "New"
     1111msgstr ""
     1112
     1113#: includes/Admin/views/snapshots.php:166
     1114msgid "Failed"
     1115msgstr ""
     1116
     1117#: includes/Admin/views/snapshots.php:183
     1118msgid "View"
     1119msgstr ""
     1120
     1121#. translators: %s: snapshot date
     1122#: includes/Admin/views/snapshots.php:189
     1123#, php-format
     1124msgid "More actions for snapshot of %s"
     1125msgstr ""
     1126
     1127#: includes/Admin/views/snapshots.php:192
     1128msgid "Snapshot actions"
     1129msgstr ""
     1130
     1131#: includes/Admin/views/snapshots.php:194
     1132msgid "Rename"
     1133msgstr ""
     1134
     1135#. translators: %s: file format
     1136#: includes/Admin/views/snapshots.php:205
     1137#, php-format
     1138msgid "Download summary (%s)"
     1139msgstr ""
     1140
     1141#: includes/Admin/views/snapshots.php:219
     1142msgid "Delete"
     1143msgstr ""
     1144
     1145#: includes/Admin/views/snapshots.php:231
     1146msgid "New label"
     1147msgstr ""
     1148
     1149#: includes/Admin/views/snapshots.php:233
     1150msgid "Save"
     1151msgstr ""
     1152
     1153#: includes/Admin/views/snapshots.php:244
     1154msgid "Each snapshot stores every product's units, unit cost and price at that moment, so later sales or price changes do not alter it. Snapshots help with your inventory count; your accountant keeps the official inventory records."
     1155msgstr ""
     1156
     1157#: includes/Admin/views/widget.php:22
     1158msgid "Add products in WooCommerce to see stock totals here."
     1159msgstr ""
     1160
     1161#. translators: %s: number of products
     1162#: includes/Admin/views/widget.php:55
     1163#, php-format
     1164msgid "%s low stock"
     1165msgid_plural "%s low stock"
     1166msgstr[0] ""
     1167msgstr[1] ""
     1168
     1169#. translators: %s: number of products
     1170#: includes/Admin/views/widget.php:61
     1171#, php-format
     1172msgid "%s out of stock"
     1173msgid_plural "%s out of stock"
     1174msgstr[0] ""
     1175msgstr[1] ""
     1176
     1177#. translators: short date and time format, see https://www.php.net/manual/datetime.format.php
     1178#: includes/Admin/views/widget.php:71
     1179msgid "j M, H:i"
     1180msgstr ""
     1181
     1182#. translators: %s: date and time
     1183#: includes/Admin/views/widget.php:73
     1184#, php-format
     1185msgid "Next snapshot: %s"
     1186msgstr ""
     1187
     1188#: includes/Admin/views/widget.php:75
     1189msgid "No snapshot scheduled"
     1190msgstr ""
     1191
     1192#: includes/Admin/views/widget.php:79
     1193msgid "Open Totals Report"
     1194msgstr ""
     1195
     1196#: includes/Capability.php:49
     1197msgid "Sorry, you are not allowed to access the Totals Report."
     1198msgstr ""
     1199
     1200#: includes/Capability.php:50
     1201msgid "Not allowed"
     1202msgstr ""
     1203
     1204#. translators: 1: site name, 2: date
     1205#: includes/Email/EmailReport.php:263
     1206#, php-format
     1207msgid "[%1$s] Stock report, %2$s"
     1208msgstr ""
     1209
     1210#. translators: %s: subject
     1211#: includes/Email/EmailReport.php:266
     1212#, php-format
     1213msgid "Test: %s"
     1214msgstr ""
     1215
     1216#: includes/Email/EmailReport.php:268
     1217msgid "Stock report"
     1218msgstr ""
     1219
     1220#. translators: %s: number of products
     1221#: includes/Email/EmailReport.php:283
     1222#, php-format
     1223msgid "%s product is low on stock."
     1224msgid_plural "%s products are low on stock."
     1225msgstr[0] ""
     1226msgstr[1] ""
     1227
     1228#. translators: %s: number of products
     1229#: includes/Email/EmailReport.php:287
     1230#, php-format
     1231msgid "%s product is out of stock."
     1232msgid_plural "%s products are out of stock."
     1233msgstr[0] ""
     1234msgstr[1] ""
     1235
     1236#: includes/Email/EmailReport.php:310
     1237#: includes/Email/views/email-html.php:44
     1238msgid "Top categories by value at retail"
     1239msgstr ""
     1240
     1241#: includes/Email/EmailReport.php:316
     1242#: includes/Email/views/email-html.php:60
     1243msgid "Open the report"
     1244msgstr ""
     1245
     1246#: includes/Email/EmailReport.php:318
     1247#: includes/Email/views/email-html.php:61
     1248msgid "Snapshots help with your inventory count; your accountant keeps the official inventory records."
     1249msgstr ""
     1250
     1251#: includes/Email/EmailReport.php:334
     1252msgid "Sorry, you are not allowed to do that."
     1253msgstr ""
     1254
     1255#: includes/Email/EmailReport.php:337
     1256msgid "A test email was sent less than a minute ago. Try again in a minute."
     1257msgstr ""
     1258
     1259#. translators: %s: comma-separated invalid addresses
     1260#: includes/Email/EmailReport.php:343
     1261#, php-format
     1262msgid "These email addresses are not valid: %s"
     1263msgstr ""
     1264
     1265#: includes/Email/EmailReport.php:346
     1266msgid "Add at least one email address."
     1267msgstr ""
     1268
     1269#: includes/Email/EmailReport.php:356
     1270msgid "The test email could not be sent. Check that this site can send email."
     1271msgstr ""
     1272
     1273#. translators: %s: number of addresses
     1274#: includes/Email/EmailReport.php:361
     1275#, php-format
     1276msgid "Test email sent to %s address."
     1277msgid_plural "Test email sent to %s addresses."
     1278msgstr[0] ""
     1279msgstr[1] ""
     1280
     1281#. translators: 1: site name, 2: date
     1282#: includes/Email/views/email-html.php:28
     1283#, php-format
     1284msgid "Stock totals for %1$s on %2$s."
     1285msgstr ""
     1286
     1287#: includes/Export/ExportController.php:73
     1288msgid "This export format is not available."
     1289msgstr ""
     1290
     1291#. translators: %s: technical error message
     1292#: includes/Export/ExportController.php:93
     1293#, php-format
     1294msgid "The export failed: %s"
     1295msgstr ""
     1296
     1297#: includes/Export/ExportController.php:212
     1298#: includes/Export/InventoryList.php:122
     1299msgid "yes"
     1300msgstr ""
     1301
     1302#: includes/Export/ExportController.php:213
     1303#: includes/Export/InventoryList.php:123
     1304msgid "no"
     1305msgstr ""
     1306
     1307#: includes/Export/ExportController.php:216
     1308msgid "ID"
     1309msgstr ""
     1310
     1311#: includes/Export/ExportController.php:218
     1312msgid "Path"
     1313msgstr ""
     1314
     1315#: includes/Export/ExportController.php:219
     1316msgid "Parent ID"
     1317msgstr ""
     1318
     1319#: includes/Export/ExportController.php:228
     1320msgid "Without cost"
     1321msgstr ""
     1322
     1323#: includes/Export/ExportController.php:231
     1324msgid "Share %"
     1325msgstr ""
     1326
     1327#: includes/Export/ExportController.php:232
     1328#: includes/Export/InventoryList.php:104
     1329msgid "Currency"
     1330msgstr ""
     1331
     1332#: includes/Export/ExportController.php:233
     1333#: includes/Export/InventoryList.php:105
     1334msgid "Prices include tax"
     1335msgstr ""
     1336
     1337#: includes/Export/ExportController.php:253
     1338msgid "Totals (each product once)"
     1339msgstr ""
     1340
     1341#. translators: %s: variation names
     1342#: includes/Export/InventoryList.php:40
     1343#: includes/Snapshots/Runner.php:290
     1344#, php-format
     1345msgid "Shared stock: %s"
     1346msgstr ""
     1347
     1348#: includes/Export/InventoryList.php:90
     1349msgid "Variation"
     1350msgstr ""
     1351
     1352#: includes/Export/InventoryList.php:91
     1353msgid "Parent SKU"
     1354msgstr ""
     1355
     1356#: includes/Export/InventoryList.php:92
     1357msgid "Categories"
     1358msgstr ""
     1359
     1360#: includes/Export/InventoryList.php:93
     1361msgid "Product status"
     1362msgstr ""
     1363
     1364#: includes/Export/InventoryList.php:95
     1365msgid "Managed"
     1366msgstr ""
     1367
     1368#: includes/Export/InventoryList.php:99
     1369msgid "Unit cost"
     1370msgstr ""
     1371
     1372#: includes/Export/InventoryList.php:102
     1373msgid "Unit price"
     1374msgstr ""
     1375
     1376#: includes/Export/InventoryList.php:106
     1377msgid "Valuation note"
     1378msgstr ""
     1379
     1380#: includes/Export/InventoryList.php:174
     1381msgid "Totals"
     1382msgstr ""
     1383
     1384#: includes/Export/InventoryList.php:194
     1385msgid "Shared stock: valued at the lowest variation price/cost"
     1386msgstr ""
     1387
     1388#: includes/Notices.php:77
     1389msgid "Totals Report 2.0:"
     1390msgstr ""
     1391
     1392#: includes/Notices.php:78
     1393msgid "stock value, inventory snapshots and exports."
     1394msgstr ""
     1395
     1396#: includes/Notices.php:80
     1397msgid "Open report"
     1398msgstr ""
     1399
     1400#: includes/Notices.php:82
     1401msgid "Dismiss"
     1402msgstr ""
     1403
     1404#: includes/Plugin.php:73
     1405msgid "Totals Report for WooCommerce needs WooCommerce to be installed and active."
     1406msgstr ""
     1407
     1408#: includes/Settings.php:103
     1409msgid "Until I delete them"
     1410msgstr ""
     1411
     1412#: includes/Settings.php:104
     1413msgid "For 10 years"
     1414msgstr ""
     1415
     1416#: includes/Settings.php:105
     1417msgid "For 5 years"
     1418msgstr ""
     1419
     1420#: includes/Settings.php:106
     1421msgid "For 1 year"
     1422msgstr ""
     1423
     1424#. translators: %s: name of a setting
     1425#: includes/Settings.php:153
     1426#, php-format
     1427msgid "The choice for “%s” was not valid and was not saved."
     1428msgstr ""
     1429
     1430#: includes/Settings.php:162
     1431msgid "The day of the email report was not valid and was not saved."
     1432msgstr ""
     1433
     1434#: includes/Settings.php:171
     1435msgid "The time of the email report must look like 08:00. It was not saved."
     1436msgstr ""
     1437
     1438#. translators: %s: comma-separated list of invalid email addresses
     1439#: includes/Settings.php:180
     1440#, php-format
     1441msgid "These email addresses are not valid, so the recipients were not changed: %s"
     1442msgstr ""
     1443
     1444#: includes/Settings.php:188
     1445msgid "The email report was turned off because it has no recipients. Add at least one email address to turn it on."
     1446msgstr ""
     1447
     1448#: includes/Snapshots/Runner.php:69
     1449msgid "A snapshot is already being taken. Wait until it is complete."
     1450msgstr ""
     1451
     1452#: includes/Snapshots/Runner.php:98
     1453msgid "The snapshot could not be saved in the database."
     1454msgstr ""
     1455
     1456#: includes/Snapshots/Runner.php:418
     1457#: includes/Snapshots/Runner.php:429
     1458msgid "The snapshot stopped making progress and was cancelled."
     1459msgstr ""
     1460
     1461#. translators: %s: year
     1462#: includes/Snapshots/Scheduler.php:181
     1463#, php-format
     1464msgid "Year-end %s"
     1465msgstr ""
     1466
     1467#. translators: 1: quarter number (1-4), 2: year
     1468#: includes/Snapshots/Scheduler.php:185
     1469#, php-format
     1470msgid "Quarter end Q%1$d %2$s"
     1471msgstr ""
     1472
     1473#. translators: 1: month name (genitive case where the language has one), 2: year
     1474#: includes/Snapshots/Scheduler.php:191
     1475#, php-format
     1476msgid "Month end %1$s %2$s"
     1477msgstr ""
     1478
     1479#: includes/Snapshots/SnapshotsController.php:55
     1480msgid "Manual snapshot"
     1481msgstr ""
     1482
     1483#. translators: %s: reason
     1484#: includes/Snapshots/SnapshotsController.php:68
     1485#, php-format
     1486msgid "The snapshot failed: %s"
     1487msgstr ""
     1488
     1489#: includes/Snapshots/SnapshotsController.php:86
     1490msgid "Snapshot renamed."
     1491msgstr ""
     1492
     1493#: includes/Snapshots/SnapshotsController.php:107
     1494msgid "Deleted while running."
     1495msgstr ""
     1496
     1497#: includes/Snapshots/SnapshotsController.php:110
     1498msgid "Snapshot deleted."
     1499msgstr ""
     1500
     1501#: assets/js/admin.js:357
     1502msgid "Delete this snapshot?"
     1503msgstr ""
     1504
     1505#: assets/js/admin.js:484
     1506msgid "Sending…"
     1507msgstr ""
     1508
     1509#: assets/js/admin.js:491
     1510#: assets/js/admin.js:495
     1511msgid "The test email could not be sent."
     1512msgstr ""
  • totals-report-for-woocommerce/trunk/readme.txt

    r3279294 r3750789  
    11=== Totals Report for WooCommerce ===
    22Contributors: bigdropgr, aivazidis
    3 Tags: inventory, report, stock, products, woocommerce report
    4 Requires at least: 5.0
    5 Tested up to: 6.7
    6 Stable tag: 1.0.2
    7 Requires PHP: 7.2
     3Tags: inventory, stock report, stock value, inventory count, stocktake
     4Requires at least: 6.5
     5Tested up to: 7.1
     6Requires PHP: 7.4
     7Requires Plugins: woocommerce
     8Stable tag: 2.0.0
    89License: GPLv2 or later
    910License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1011
    11 Comprehensive product inventory reporting tool with detailed insights into your WooCommerce product catalog.
     12Stock totals and stock value by category, year-end inventory snapshots, and exports your accountant can open in Excel.
    1213
    1314== Description ==
    1415
    15 Totals Report for WooCommerce provides a powerful, easy-to-use interface for tracking and analyzing your WooCommerce product inventory. With a single click, store managers can access critical insights about their product catalog.
     16**Totals Report for WooCommerce** answers three questions in one screen:
    1617
    17 = Key Features =
    18 * Total product count
    19 * In-stock and out-of-stock product tracking
    20 * Low stock and backorder monitoring
    21 * Detailed variation analysis
    22 * Stock quantity overview
    23 * Category-specific inventory data
    24 * Performance optimized
    25 * Multisite compatible
    26 * Translation ready
     18* How many products and units do I have in stock, per category?
     19* What is my stock worth, at cost and at retail price?
     20* What did I hold on 31 December, for the year-end inventory count?
    2721
    28 = Performance and Compatibility =
    29 * WordPress 5.0+ compatible
    30 * WooCommerce 5.0.0+ support
    31 * High-Performance Order Storage (HPOS) compatible
    32 * PHP 7.2+ required
     22WooCommerce Analytics lists stock product by product. Totals Report adds up stock **per category or tag**, puts a **value** on it, and keeps **inventory snapshots** you can hand to your accountant.
    3323
    34 = Use Cases =
    35 * Quickly assess overall inventory health
    36 * Track product availability
    37 * Identify low stock items
    38 * Monitor backorder products
    39 * Understand product type distribution
    40 * Monitor category-specific product metrics
     24= Stock totals at a glance =
     25
     26* Products, units in stock, stock value at cost and stock value at retail
     27* Five clear stock states that always add up: in stock, low stock, on backorder, out of stock, stock not managed
     28* Totals per category (with subcategories) or per tag
     29* Filter by stock status and by units in stock, search, and sort the table by name or by any figure
     30* Click a category or tag to open its products in WooCommerce, filtered by stock status where WooCommerce supports it
     31
     32= Stock valuation =
     33
     34* Value at cost uses the native WooCommerce **Cost of Goods Sold** field
     35* Value at retail uses the current price or the regular price, your choice
     36* Shows which products have no cost yet, so the valuation is never silently incomplete
     37
     38= Year-end inventory count (stocktake) =
     39
     40* **Inventory snapshots** freeze units, unit costs and prices at a moment in time
     41* Automatic snapshot at year end (scheduled for 31 December, 23:59, in your site's timezone), and optionally at the end of each quarter or month
     42* Take a snapshot any time, give it a label, and view its frozen figures later
     43* **Inventory list** export: every product and variation with SKU, units, unit cost and value (variations that share their parent's stock are one row), ready for your accountant
     44
     45= Exports that open correctly =
     46
     47* CSV, JSON and XML summaries of what you see on screen
     48* CSV files open in Excel with Greek and other non-Latin characters intact, with the right separator for your site language (you can change it in Settings)
     49* Spreadsheet formula injection is neutralised in every CSV
     50
     51= Also included =
     52
     53* Weekly or monthly stock report by email, with the inventory list attached if you want
     54* "Stock at a glance" widget on the WordPress Dashboard
     55* Fast on large catalogues: built on WooCommerce's product lookup table, no slow product-by-product loops
     56* Fully translated into Greek; translation-ready for every language
     57* No external requests, no tracking, no ads
    4158
    4259== Installation ==
    4360
    44 1. Upload the plugin files to the `/wp-content/plugins/totals-report-for-woocommerce` directory
    45 2. Activate the plugin through the 'Plugins' menu in WordPress
    46 3. Navigate to WooCommerce > Totals Report to view your product insights
     611. Install and activate WooCommerce.
     622. Install Totals Report for WooCommerce from Plugins › Add New, or upload the plugin folder to `/wp-content/plugins/`.
     633. Activate it and open **WooCommerce › Totals Report**.
     644. Optional: turn on **Cost of Goods Sold** in WooCommerce › Settings › Advanced › Features to see stock value at cost.
    4765
    4866== Frequently Asked Questions ==
    4967
    50 = How does this plugin improve WooCommerce inventory management? =
     68= Does this plugin change my products or stock? =
    5169
    52 Totals Report for WooCommerce provides a comprehensive overview of your entire product catalog in one centralized dashboard. This allows you to quickly assess inventory status, identify out-of-stock products, and understand product distribution across categories and types without having to navigate through multiple WooCommerce screens.
     70No. It only reads your catalogue. It writes only its own data: settings and a few bookkeeping options (its version and next run times), the snapshots you take or schedule, its scheduled tasks (in WooCommerce's Action Scheduler), a 10-minute cache for the Dashboard widget, short-lived notices and locks, a per-user flag when you dismiss the upgrade notice, and, when the email report attaches the inventory list, a temporary file in your uploads folder that is deleted right after sending.
    5371
    54 = Will this plugin slow down my WooCommerce store? =
     72= How is "value at cost" calculated? =
    5573
    56 No, the plugin is designed with performance in mind. It uses efficient database queries and implements caching mechanisms to ensure minimal impact on your store's performance, even with large product catalogs. The report data is generated only when needed and cached for future use.
     74Units in stock multiplied by each product's cost from the WooCommerce Cost of Goods Sold field. Variations use their own cost, or the cost set on their parent product (or both added together, when the variation is set to add its cost to the parent's). Products with units in stock but without a cost are listed separately and are not counted in the value at cost. WooCommerce stores a cost of 0 on a simple or variable product as "no cost", so such products show up in that list.
    5775
    58 = Does the plugin work with variable products and product variations? =
     76= How is "value at retail" calculated? =
    5977
    60 Yes, Totals Report for WooCommerce fully supports variable products and their variations. The report provides detailed information about total variations across your store and intelligently tracks stock status for variable products based on the availability of their variations.
     78Units in stock multiplied by the current price (the sale price while a sale is running) or by the regular price, depending on your setting. Prices are used as stored in WooCommerce, with or without tax according to your store settings. Every export states the currency and whether prices include tax.
    6179
    62 = Can I export the inventory reports? =
     80= Why can category rows add up to more than the store total? =
    6381
    64 Absolutely! The plugin offers multiple export formats including CSV, JSON, and XML. This makes it easy to share inventory data with team members or import it into external systems for further analysis.
     82A product that belongs to two categories is counted in both. Parent categories include their subcategories without counting a product twice.
    6583
    66 = Is the plugin compatible with custom product types? =
     84= Which products are counted? =
    6785
    68 Yes, the plugin works with all standard WooCommerce product types and provides a flexible framework that supports custom product types. It will track and categorize any product type registered in your WooCommerce store.
     86All products except those in the trash (you can limit this to published products only). Grouped and external products are left out because they hold no stock of their own. A variable product counts as one product; its units and value come from its variations, including disabled ones. When variations share the stock of their parent product, that stock is counted once (shown as "Shared stock"), valued at the lowest price among those variations that have a price, and at the lowest cost among them; if any of them has no cost, that stock is listed as without cost. Disabled variations are left out of this choice unless all of them are disabled; if none of the variations taken into account has a price, that stock is valued at 0 at retail. In the inventory list these lines carry a valuation note.
    6987
    70 = Does this plugin work with multilingual stores? =
     88= What do the five stock states mean? =
    7189
    72 Yes, Totals Report for WooCommerce is fully translation-ready and supports internationalization. The plugin includes translation files and can be easily translated into any language using standard WordPress translation tools.
     90In stock, low stock (at or below the low-stock threshold of the product, of its parent product, or of your store, in that order), on backorder, out of stock, and stock not managed (available, but the quantity is not tracked). Every product is in exactly one state, so the five always add up to the total. A variable product is low on stock when any of its available variations is. Negative stock (from backorders) counts as 0 units.
    7391
    74 = Is this plugin compatible with the latest versions of WordPress and WooCommerce? =
     92= Can I use the snapshots for my year-end inventory? =
    7593
    76 Yes, we regularly test and update the plugin to ensure compatibility with the latest versions of both WordPress and WooCommerce. The plugin supports WordPress 5.0+ and WooCommerce 5.0.0+, including the new High-Performance Order Storage (HPOS) system.
     94Snapshots record what your shop held at the time the snapshot runs (large shops are read in batches, so a sale made meanwhile can show up), and the inventory list gives your accountant every item with its quantity and cost. They help with your inventory count; your accountant keeps the official inventory records.
    7795
    78 = Does the plugin require any special server requirements? =
     96= Do snapshots change if I edit products later? =
    7997
    80 Totals Report for WooCommerce has minimal server requirements beyond what WordPress and WooCommerce already need. It requires PHP 7.2 or higher and a properly configured WordPress installation with WooCommerce active.
     98No. A snapshot is stored separately and its numbers never change. You can rename or delete it, and the "Keep snapshots" setting can delete old ones automatically.
     99
     100= When exactly is the year-end snapshot taken? =
     101
     102It is scheduled for 31 December at 23:59 in your site's timezone and runs through WooCommerce's Action Scheduler, which needs WP-Cron. WP-Cron runs when someone visits the site, so on a quiet shop the snapshot can be taken a little later. For an exact year-end count, set up a real server cron for WP-Cron, or take a snapshot yourself before the first sale of the new year.
     103
     104= Does it work with large catalogues? =
     105
     106Yes. The report reads WooCommerce's product lookup table with a few database queries, and exports and snapshots run in batches. When it finds products missing from the lookup table, or recently changed products that disagree with it, it tells you how to regenerate the table.
     107
     108= Does it support multiple warehouses or stock locations? =
     109
     110No. It reports the single stock quantity WooCommerce keeps for each product or variation.
     111
     112= Is my data deleted when I remove the plugin? =
     113
     114Only if you choose so in Settings › Dashboard and data. Otherwise your snapshots and settings stay in the database in case you need them later. Scheduled tasks are always removed.
    81115
    82116== Screenshots ==
    83117
    84 1. Totals Report Overview - Shows the main dashboard with key inventory metrics
    85 2. Product Type Distribution - Displays the breakdown of different product types in your store
    86 3. Product Categories - Detailed view of products by category with availability, stock status, and variation data
     1181. Stock totals and value per category, with the five stock states.
     1192. Low stock filter and the export menu.
     1203. Inventory snapshots for the year-end count.
     1214. Settings: snapshot schedule, email report, stock value and exports.
     1225. Stock at a glance widget on the WordPress Dashboard.
     1236. The report on a phone.
    87124
    88125== Changelog ==
    89126
     127= 2.0.0 =
     128* Complete rewrite.
     129* New: stock value at cost (WooCommerce Cost of Goods Sold) and at retail, per category and per tag.
     130* New: inventory snapshots, manual and scheduled (year end, quarter end, month end).
     131* New: inventory list export per product and variation for the year-end count.
     132* New: filters by stock status and units, grouping by category or tag, search and sorting.
     133* New: email report and Dashboard widget.
     134* New: five mutually exclusive stock states that always add up to the total.
     135* Fixed: XML export now produces valid XML.
     136* Fixed: categories with the same name under different parents are no longer merged.
     137* Faster on large catalogues.
     138* Complete Greek translation.
     139
    90140= 1.0.2 =
    91 * Changed terminology from "Available" to "In Stock" to match WooCommerce standards
    92 * Added Low Stock and On Backorder tracking for products
    93 * Added pagination to the Category Reports for easier navigation with large catalogs
    94 * Added "rows per page" option to customize the number of categories displayed
    95 * Redesigned the report interface to be wider and left-aligned
    96 * Moved export buttons to the bottom of the page
    97 * Improved category report with new columns:
    98   * Low Stock Products - Shows the number of products with low stock levels in each category
    99   * On Backorder Products - Shows the number of backorder products in each category
    100 * Enhanced export functionality to include the new low stock and backorder data
     141* Changed terminology from "Available" to "In Stock".
     142* Added low stock and on backorder tracking, pagination and rows per page in the category report.
    101143
    102144= 1.0.1 =
    103 * Fixed display of category names in reports (previously showing slugs)
    104 * Added new columns to the Product Categories report:
    105   * Available Products - Shows the number of in-stock products for each category
    106   * Out of Stock Products - Shows the number of out-of-stock products for each category
    107   * Variable Products - Shows the number of variable products for each category
    108 * Improved export functionality to include the new category data
    109 * Fixed plugin code to meet WordPress.org guidelines
    110 * Added formal WooCommerce dependency declaration
    111 * Improved code organization and namespacing
     145* Fixed category names in reports, added in-stock, out-of-stock and variable product columns.
    112146
    113147= 1.0.0 =
    114 * Initial public release
    115 * Added comprehensive product reporting
    116 * Included export functionality (CSV, JSON, XML)
    117 * Added multilingual support
    118 * Implemented performance optimization with caching
     148* Initial release.
    119149
    120150== Upgrade Notice ==
    121151
    122 = 1.0.2 =
    123 This update adds Low Stock and Backorder tracking, improves the interface with pagination, and enhances category reporting with more detailed metrics.
    124 
    125 = 1.0.1 =
    126 This update fixes category name display in reports and adds new category detail columns (available, out-of-stock, and variable products). Highly recommended for all users.
    127 
    128 = 1.0.0 =
    129 Initial release of Totals Report for WooCommerce.
    130 
    131 == Additional Information ==
    132 
    133 For more information, visit [BigDrop.gr](https://bigdrop.gr)
     152= 2.0.0 =
     153Complete rewrite with stock value, inventory snapshots for the year-end count, and new exports. Review the new Settings tab after updating.
  • totals-report-for-woocommerce/trunk/totals-report-for-woocommerce.php

    r3279294 r3750789  
    11<?php
    22/**
    3  * Totals Report for WooCommerce Plugin
    4  *
    5  * @package           TotalsReportForWooCommerce
    6  * @author            BigDrop.gr
    7  * @copyright         2024 BigDrop.gr
    8  * @license           GPL-2.0-or-later
    9  *
    10  * @wordpress-plugin
    113 * Plugin Name:       Totals Report for WooCommerce
    124 * Plugin URI:        https://bigdrop.gr/totals-report-for-woocommerce
    13  * Description:       Adds a comprehensive Totals page under the WooCommerce admin menu to display product counts, stock information, and export capabilities.
    14  * Version:           1.0.2
    15  * Requires at least: 5.0
    16  * Requires PHP:      7.2
     5 * Description:       Stock totals and stock value by category or tag, year-end inventory snapshots, and exports your accountant can open in Excel.
     6 * Version:           2.0.0
     7 * Requires at least: 6.5
     8 * Requires PHP:      7.4
    179 * Requires Plugins:  woocommerce
    1810 * Author:            BigDrop.gr
    1911 * Author URI:        https://bigdrop.gr
     12 * License:           GPL-2.0-or-later
     13 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
    2014 * Text Domain:       totals-report-for-woocommerce
    2115 * Domain Path:       /languages
    22  * License:           GPL-2.0-or-later
    23  * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
    24  * WC requires at least: 5.0.0
    25  * WC tested up to:   9.7.1
    26  * WooCommerce HPOS Compatible: true
     16 * WC requires at least: 8.0
     17 * WC tested up to:   11.2
     18 *
     19 * @package BigDrop\TotalsReport
    2720 */
    2821
    29 // Prevent direct file access.
    30 if ( ! defined( 'ABSPATH' ) ) {
    31     exit;
    32 }
     22defined( 'ABSPATH' ) || exit;
    3323
    34 // Define plugin constants.
    35 define( 'TRWC_VERSION', '1.0.2' );
    36 define( 'TRWC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    37 define( 'TRWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     24define( 'TRWC_VERSION', '2.0.0' );
     25define( 'TRWC_FILE', __FILE__ );
     26define( 'TRWC_DIR', plugin_dir_path( __FILE__ ) );
     27define( 'TRWC_URL', plugin_dir_url( __FILE__ ) );
    3828define( 'TRWC_BASENAME', plugin_basename( __FILE__ ) );
     29// Documentation page on bigdrop.gr (placeholder until the article is published).
     30define( 'TRWC_DOCS_URL', 'https://bigdrop.gr/totals-report-for-woocommerce' );
     31define( 'TRWC_SUPPORT_URL', 'https://wordpress.org/support/plugin/totals-report-for-woocommerce/' );
    3932
    40 /**
    41  * Check if WooCommerce is active
    42  */
    43 function trwc_is_woocommerce_active() {
    44     $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
    45    
    46     // Check for single site
    47     if ( in_array( 'woocommerce/woocommerce.php', $active_plugins, true ) ) {
    48         return true;
    49     }
    50    
    51     // Check for multisite
    52     if ( is_multisite() ) {
    53         $network_active_plugins = array_keys( get_site_option( 'active_sitewide_plugins', [] ) );
    54         if ( in_array( 'woocommerce/woocommerce.php', $network_active_plugins, true ) ) {
    55             return true;
    56         }
    57     }
    58    
    59     return false;
    60 }
     33spl_autoload_register(
     34        static function ( $class_name ) {
     35                $prefix = 'BigDrop\\TotalsReport\\';
     36                if ( 0 !== strpos( $class_name, $prefix ) ) {
     37                        return;
     38                }
     39                $relative = str_replace( '\\', '/', substr( $class_name, strlen( $prefix ) ) );
     40                $file     = TRWC_DIR . 'includes/' . $relative . '.php';
     41                if ( is_readable( $file ) ) {
     42                        require $file;
     43                }
     44        }
     45);
    6146
    62 /**
    63  * Add global admin notice at the top of the page
    64  */
    65 function trwc_admin_notice() {
    66     global $pagenow;
    67    
    68     // Only show on the plugins page
    69     if ( $pagenow !== 'plugins.php' ) {
    70         return;
    71     }
    72    
    73     // Only show if WooCommerce is not active
    74     if ( trwc_is_woocommerce_active() ) {
    75         return;
    76     }
    77    
    78     // Use the same format as in the screenshot with red left border
    79     echo '<div class="notice notice-error" style="border-left-color: #dc3232;">';
    80     echo '<p>' . esc_html__( 'Totals Report for WooCommerce cannot be activated because it requires the WooCommerce plugin to be installed and active.', 'totals-report-for-woocommerce' ) . '</p>';
    81     echo '</div>';
    82 }
    83 add_action( 'admin_notices', 'trwc_admin_notice' );
     47add_action(
     48        'before_woocommerce_init',
     49        static function () {
     50                if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
     51                        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', TRWC_FILE, true );
     52                        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', TRWC_FILE, true );
     53                        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cost_of_goods_sold', TRWC_FILE, true );
     54                }
     55        }
     56);
    8457
    85 /**
    86  * Add notice below plugin in the list
    87  */
    88 function trwc_after_plugin_row( $plugin_file, $plugin_data, $status ) {
    89     if ( trwc_is_woocommerce_active() ) {
    90         return;
    91     }
    92    
    93     $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
    94     $colspan = $wp_list_table->get_column_count();
    95    
    96     echo '<tr class="plugin-update-tr active">';
    97     echo '<td colspan="' . esc_attr( $colspan ) . '" class="plugin-update colspanchange">';
    98     echo '<div class="update-message notice inline notice-error notice-alt">';
    99     echo '<p>' . esc_html__( 'This plugin cannot be activated because required plugins are missing or inactive.', 'totals-report-for-woocommerce' ) . '</p>';
    100     echo '</div>';
    101     echo '</td>';
    102     echo '</tr>';
    103 }
    104 add_action( 'after_plugin_row_' . plugin_basename( __FILE__ ), 'trwc_after_plugin_row', 10, 3 );
     58register_activation_hook( TRWC_FILE, array( '\BigDrop\TotalsReport\Install', 'activate' ) );
     59register_deactivation_hook( TRWC_FILE, array( '\BigDrop\TotalsReport\Install', 'deactivate' ) );
    10560
    106 /**
    107  * Modify plugin description to add "Requires: WooCommerce"
    108  */
    109 function trwc_modify_plugin_description( $plugin_meta, $plugin_file, $plugin_data, $status ) {
    110     if ( $plugin_file === plugin_basename( __FILE__ ) ) {
    111         // Add "Requires: WooCommerce" text
    112         echo '<br>';
    113         echo esc_html__( 'Requires:', 'totals-report-for-woocommerce' ) . ' <a href="' . esc_url( admin_url( 'plugin-install.php?s=woocommerce&tab=search&type=term' ) ) . '">WooCommerce</a>';
    114     }
    115    
    116     return $plugin_meta;
    117 }
    118 add_action( 'plugin_row_meta', 'trwc_modify_plugin_description', 10, 4 );
    119 
    120 /**
    121  * Prevent plugin activation when dependencies are not met
    122  */
    123 function trwc_check_dependencies() {
    124     if ( ! trwc_is_woocommerce_active() ) {
    125         // Make sure Totals Report for WooCommerce is not active
    126         if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
    127             deactivate_plugins( plugin_basename( __FILE__ ) );
    128            
    129             // Prevent WordPress from redirecting to the activation page
    130             if ( isset( $_GET['activate'] ) && ! isset( $_REQUEST['_wpnonce'] ) ) {
    131                 // Check if this is an admin request
    132                 if ( is_admin() ) {
    133                     wp_verify_nonce( null );
    134                 }
    135                 unset( $_GET['activate'] );
    136             }
    137         }
    138     }
    139 }
    140 add_action( 'admin_init', 'trwc_check_dependencies' );
    141 
    142 /**
    143  * Activation hook
    144  */
    145 register_activation_hook( __FILE__, 'trwc_activate' );
    146 
    147 function trwc_activate() {
    148     // Check if WooCommerce is active
    149     if ( ! trwc_is_woocommerce_active() ) {
    150         // Deactivate our plugin
    151         deactivate_plugins( plugin_basename( __FILE__ ) );
    152        
    153         // Stop activation and show error
    154         wp_die( esc_html__( 'Totals Report for WooCommerce requires WooCommerce to be installed and active. Please install and activate WooCommerce first, then activate this plugin.', 'totals-report-for-woocommerce' ) );
    155     }
    156    
    157     // Normal activation tasks
    158     $current_version = get_option( 'trwc_version' );
    159    
    160     // First-time installation
    161     if ( ! $current_version ) {
    162         update_option( 'trwc_version', TRWC_VERSION );
    163     }
    164    
    165     // Version update logic
    166     if ( version_compare( $current_version, TRWC_VERSION, '<' ) ) {
    167         update_option( 'trwc_version', TRWC_VERSION );
    168     }
    169 }
    170 
    171 // Only proceed if WooCommerce is active
    172 if ( ! trwc_is_woocommerce_active() ) {
    173     return;
    174 }
    175 
    176 // Include necessary files.
    177 require_once TRWC_PLUGIN_DIR . 'includes/class-trwc-report.php';
    178 require_once TRWC_PLUGIN_DIR . 'includes/class-trwc-report-export.php';
    179 require_once TRWC_PLUGIN_DIR . 'includes/class-trwc-report-admin.php';
    180 
    181 // Initialize the plugin.
    182 function trwc_init() {
    183     // No need for load_plugin_textdomain since WordPress 4.6+ for plugins hosted on WordPress.org
    184 
    185     // Initialize classes
    186     TRWC_Report::get_instance();
    187     TRWC_Report_Export::get_instance();
    188     TRWC_Report_Admin::get_instance();
    189 }
    190 add_action( 'plugins_loaded', 'trwc_init' );
    191 
    192 // Add HPOS compatibility.
    193 add_action( 'before_woocommerce_init', function() {
    194     if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
    195         \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    196     }
    197 } );
    198 
    199 // Deactivation hook.
    200 register_deactivation_hook( __FILE__, 'trwc_deactivate' );
    201 
    202 /**
    203  * Plugin deactivation routine.
    204  */
    205 function trwc_deactivate() {
    206     // Cleanup tasks if needed
    207 }
     61add_action( 'plugins_loaded', array( '\BigDrop\TotalsReport\Plugin', 'boot' ) );
  • totals-report-for-woocommerce/trunk/uninstall.php

    r3279294 r3750789  
    11<?php
    2 // If uninstall is not called from WordPress, exit
    3 if (!defined('WP_UNINSTALL_PLUGIN')) {
    4     exit;
     2/**
     3 * Uninstall: always removes scheduled work, transients and notice flags; removes the snapshot
     4 * tables and the settings only when "Delete snapshots and settings when the plugin is deleted" is on.
     5 *
     6 * @package BigDrop\TotalsReport
     7 */
     8
     9defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
     10defined( 'ABSPATH' ) || exit;
     11
     12// phpcs:disable WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange -- Removing this plugin's own data.
     13
     14/**
     15 * Clean one site.
     16 */
     17function trwc_uninstall_site() {
     18        global $wpdb;
     19
     20        // Scheduled actions of the `trwc` group (and our hooks), with or without Action Scheduler loaded.
     21        if ( function_exists( 'as_unschedule_all_actions' ) && class_exists( 'ActionScheduler' ) && ActionScheduler::is_initialized() ) {
     22                as_unschedule_all_actions( '', array(), 'trwc' );
     23                foreach ( array( 'trwc_scheduled_snapshot', 'trwc_email_report', 'trwc_daily_maintenance', 'trwc_snapshot_batch' ) as $trwc_hook ) {
     24                        as_unschedule_all_actions( $trwc_hook );
     25                }
     26        } else {
     27                $trwc_actions = $wpdb->prefix . 'actionscheduler_actions';
     28                $trwc_groups  = $wpdb->prefix . 'actionscheduler_groups';
     29                if ( $trwc_actions === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $trwc_actions ) ) ) ) {
     30                        $wpdb->query( $wpdb->prepare( "DELETE FROM %i WHERE hook IN ('trwc_scheduled_snapshot','trwc_email_report','trwc_daily_maintenance','trwc_snapshot_batch') AND status IN ('pending','in-progress')", $trwc_actions ) );
     31                        if ( $trwc_groups === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $trwc_groups ) ) ) ) {
     32                                $wpdb->query( $wpdb->prepare( "DELETE a FROM %i a INNER JOIN %i g ON g.group_id = a.group_id WHERE g.slug = 'trwc' AND a.status IN ('pending','in-progress')", $trwc_actions, $trwc_groups ) );
     33                        }
     34                }
     35        }
     36
     37        delete_transient( 'trwc_widget_data' );
     38        delete_transient( 'trwc_test_email_lock' );
     39        $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\\_transient\\_trwc\\_notice\\_%' OR option_name LIKE '\\_transient\\_timeout\\_trwc\\_notice\\_%'" );
     40        foreach ( array( 'trwc_snapshot_lock', 'trwc_snapshot_batch_lock', 'trwc_upgraded_from', 'trwc_needs_setup', 'trwc_next_snapshot', 'trwc_next_email' ) as $trwc_option ) {
     41                delete_option( $trwc_option );
     42        }
     43
     44        // Temporary attachment folders left by an interrupted email.
     45        $trwc_uploads = wp_upload_dir( null, false );
     46        foreach ( (array) glob( trailingslashit( $trwc_uploads['basedir'] ) . 'trwc-tmp-*', GLOB_ONLYDIR ) as $trwc_dir ) {
     47                // Two plain patterns (GLOB_BRACE is missing on some PHP builds): visible and hidden files.
     48                foreach ( array_merge( (array) glob( $trwc_dir . '/*' ), (array) glob( $trwc_dir . '/.*' ) ) as $trwc_file ) {
     49                        if ( is_file( $trwc_file ) ) {
     50                                wp_delete_file( $trwc_file );
     51                        }
     52                }
     53                rmdir( $trwc_dir ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_rmdir -- Our own temporary folder.
     54        }
     55
     56        $trwc_settings = get_option( 'trwc_settings' );
     57        if ( is_array( $trwc_settings ) && ! empty( $trwc_settings['delete_data'] ) ) {
     58                $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'trwc_snapshot_items' ) );
     59                $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'trwc_snapshots' ) );
     60                foreach ( array( 'trwc_settings', 'trwc_version', 'trwc_db_version', 'trwc_settings_saved_at' ) as $trwc_option ) {
     61                        delete_option( $trwc_option );
     62                }
     63        } elseif ( false !== get_option( 'trwc_version', false ) ) {
     64                // Data kept: if the plugin is installed again, its schedule must be set up again.
     65                update_option( 'trwc_needs_setup', 1, false );
     66        }
    567}
    668
    7 // Delete plugin options
    8 delete_option('trwc_version');
     69if ( is_multisite() ) {
     70        foreach ( get_sites(
     71                array(
     72                        'fields' => 'ids',
     73                        'number' => 0,
     74                )
     75        ) as $trwc_site_id ) {
     76                switch_to_blog( (int) $trwc_site_id );
     77                trwc_uninstall_site();
     78                restore_current_blog();
     79        }
     80} else {
     81        trwc_uninstall_site();
     82}
     83
     84// The dismissed-notice flag is user meta (shared by every site of a network).
     85delete_metadata( 'user', 0, 'trwc_dismissed_upgrade_notice', '', true );
Note: See TracChangeset for help on using the changeset viewer.