Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78382680a4 | ||
|
|
8d77c9c90b |
@@ -395,6 +395,8 @@ def search_product(search):
|
|||||||
page = 1
|
page = 1
|
||||||
total_products = 0 # Initialize the counter for total products
|
total_products = 0 # Initialize the counter for total products
|
||||||
|
|
||||||
|
log = options.get("log_message", None)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
products = wcapi.get("products", params={"per_page": 100, "page": page, "search": search}).json()
|
products = wcapi.get("products", params={"per_page": 100, "page": page, "search": search}).json()
|
||||||
if not products:
|
if not products:
|
||||||
@@ -427,7 +429,6 @@ def process_all_products(options):
|
|||||||
total_products += 1 # Update the total count
|
total_products += 1 # Update the total count
|
||||||
options["product_id"] = product["id"]
|
options["product_id"] = product["id"]
|
||||||
options["product"] = product
|
options["product"] = product
|
||||||
log = options.get("log_message", None)
|
|
||||||
if log:
|
if log:
|
||||||
if product:
|
if product:
|
||||||
name = product.get("name", "")
|
name = product.get("name", "")
|
||||||
@@ -437,7 +438,8 @@ def process_all_products(options):
|
|||||||
page += 1
|
page += 1
|
||||||
|
|
||||||
# Log the total number of products processed
|
# Log the total number of products processed
|
||||||
log(f"Total products processed: {total_products}")
|
if log:
|
||||||
|
log.log_message(f"Total products processed: {total_products}")
|
||||||
|
|
||||||
# Show completion message
|
# Show completion message
|
||||||
messagebox.showinfo(
|
messagebox.showinfo(
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ This value is used by the Settings update checker.
|
|||||||
GitHub Actions overwrites this file for tagged builds.
|
GitHub Actions overwrites this file for tagged builds.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "v1.3.0"
|
__version__ = "v1.3.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user