tychesoftwares / custom-order-numbers-for-woocommerce Goto Github PK
View Code? Open in Web Editor NEWThis repository is for the Custom Order Numbers for WooCommerce- Lite
This repository is for the Custom Order Numbers for WooCommerce- Lite
I have a issue on the above plugin, and also submit the report to Tyche Software. In my Wordpress dashboard show there is a Plugin to be updated but when when come to the Plugin dashboard shown nothing is to be updated. Which i guess is Phantom Plugin the I run a test and it showed that the Plugin is Custom Order Numbers is yet to update as shown in the attached.
Describe the bug
When the plugin is active the site works multiple times slower. This is what the client is saying: WP Engine called me today to discuss the load spikes we were having on the server until we reverted to the older plugin, so obviously a huge load issue with the plugin itself.
To Reproduce
Steps to reproduce the behavior:
I can replicate this issue on the client's site only. Follow the steps here - https://screencast-o-matic.com/watch/cri3IFVi4LQ
Setup: https://prnt.sc/1enlzi5
Enable order tracking by custom number setting is enabled.
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/31120
You can check the query using Query Monitor plugin.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only one field should be visible depends on the selected value in 'Select orders to apply new settings to' field.
Describe the bug
A fatal error appears when I try to click the "Renumerate Order" button.
To Reproduce
Plugin setting page, click on the "Renumerate Order Tool" button
Then again click on the "Renumerate Order" button.
The plugin throws a fatal error. https://www.screencast.com/t/fvUnzAs5z
Expected behavior
No error must be thrown from our plugin.
Describe the bug
Admin notice does not appear when I try to install v1.3.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Admin notice should appear.
Q: In the third-party plugin, how to use the custom order numbers instead of WooCommerce Order Number?
In this plugin, in the Database, we do not change the original order id created by WooCommerce because that order id is used for many core functions and also by multiple plugins and themes.
So what you will have to do is, you will have to contact to support team of the third-party plugin and ask them to make the necessary changes. They will have to make the changes where Order ID is been fetched and have to use the below code for Custom Order Number instead of the code used for Order ID.
Here is the code they will need.
$custom_order_number = $order->get_order_number(); //where $order is an order object
Add FAQ here - https://wordpress.org/plugins/custom-order-numbers-for-woocommerce/
Describe the bug
Database updated successfully notice display twice the time on the woo_order page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Database update notice should be shown only 1 time on the woo_order page.
Describe the bug
After updating the database, custom order numbers for the subscription orders get changed on the subscription order page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After updating the database, custom order numbers for the subscription order should not get changed.
Screenshots
Subscription orders page screenshots:
Before updating the database: https://prnt.sc/115g97s
After updating the database: https://prnt.sc/115g97s
Describe the bug
Revise the document to incorporate information on the "Order Numbers Counter" feature.
Docs link : https://www.tychesoftwares.com/docs/woocommerce-custom-order-numbers/custom-order-numbers-options/
Include information in the document explaining how the Sequential option, Order ID, and Pseudorandom – crc32 Hash (max 10 digits) operate in the Order Numbers Counter field.
Note: Clients are deactivating the CON Lite plugin, The reason is "Order Numbers not being properly generated."
While my investigation using all three available options indicates that everything is functioning as expected
Is your feature request related to a problem? Please describe.
Add the deactivation survey v2 in the plugin.
Describe the solution you'd like
Tyche Javascript Constructor: https://github.com/TycheSoftwares/tyche-js-constructor
Plugin Deactivation: https://github.com/TycheSoftwares/tyche-plugin-deactivation
The description of the usage is in the README.md files of the respective repos.
Describe the bug
I am encountering an issue with Custom Order Numbers for WooCommerce. When manually adding an order through WooCommerce by navigating to "Add Order" and inputting the necessary details including products and customer information, the custom order number is not updated immediately upon order creation. Instead, the new desired order number is generated after publishing the order.
This poses a problem because the email notification sent to the customer contains the old order number rather than the updated one.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The custom order number should be updated immediately upon manual order creation through WooCommerce backend. This ensures that the correct order number is included in email notifications sent to customers.
Additional context
https://support.tychesoftwares.com/conversation/658?folder_id=9
Describe the bug
There have been some updates to the Tyche JS and Plugin Deactivation repos.
Please update the v2 Plugin Deactivation files in the plugins where they have been implemented in.
Describe the bug
A deprecated notice appears on the plugin page with PHP 8.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error must be thrown from our plugin with PHP 8.2
Describe the bug
The client informed that the latest update has changed the hook used for generating the number. The problem is that the priority of the call is set to PHP_INT_MAX, which means that the nothing else can use the same woocommerce hook AND get the new order number.
Link: https://wordpress.org/support/topic/new-order-number-needs-to-be-made-available/
Describe the bug
Add the data tracking code in the plugin to ensure all the relevant details (global settings, product settings etc.) are sent back to the tracking server.
This exercise is needed to ensure we're collecting all the relevant data (with regards to the all features added ) and utilizing the data to its fullest potential.
Additional context
https://docs.google.com/document/d/1T-4QcwvO1K-dZLFQwOxC_xvPjX4QFFXuSqt1bNn7lU4/edit
Describe the bug
When HPOS enabled, we are facing an issue where we can no longer search for orders using the order number in the admin panel. When searching by order ID, there are no problems, but using the order number returns no results.
If we disable the plugin, we lose the order numbers and are left with order IDs only. This suggests there might be a compatibility issue between the HPOS update and our existing plugins.
To Reproduce
Steps to reproduce the behavior:
Navigate to the WooCommerce > Settings > Advance > Features and enable HPOS:
Attempt to search for orders using the order number.
Expected behavior
We should be able to search for orders using the order number and receive relevant results.
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/58654
When a prefix is added to the orders and exporting the orders to CSV, it is not showing the orders along with the prefix.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/18056
Describe the bug
After updating your plugin Custom Order Numbers for Woocommerce we had a major database crash. Fortunately our host support managed to place back an older version and our webshop was accesable again after half an hour. We have been using your plugin for some time now and where very happy and satisfied.
. FYI this is the culprit query that took done one of our shops:
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = '_alg_wc_custom_order_number' ) LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = '_alg_wc_custom_order_number_meta_key_updated' ) WHERE 1=1 AND (
wp_postmeta.post_id IS NULL
AND
mt1.post_id IS NULL
) AND wp_posts.post_type = 'shop_order' AND ((wp_posts.post_status <> 'trash' AND wp_posts.post_status <> 'auto-draft')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 5000
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/30738
Describe the bug
We are getting the following warning in our server error logs regarding the plugin:
KILLED QUERY (60093 characters long generated in /wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php:262): SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN ([order numbers listed]...
It seems the Query is listing all the original order numbers and due to the volume of orders being placed, it is exceeding the current limit.
We have noticed slow down in the wp-admin area more recently as I’m assuming the more order that are place, the bigger toll it is taking? We also previously reported a conflict with our server’s (WP Engine) Object Caching system which had to be disabled – again, assuming because of the number of orders being placed.
To Reproduce
There’s currently over 20,000 orders on the website as of now.
Additional context
https://wordpress.org/support/topic/php-warning-killed-query/
Describe the bug
Renumerate Orders notice appears twice the time.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Renumerate Orders notice should appear only one time
Describe the bug
Slow query found on the woo-order page.
To Reproduce
Steps to reproduce the behavior:
https://www.screencast.com/t/HgC3LkWQupZm
Expected behavior
No slow query is reported from our plugin.
The client has an issue where order numbers along with the prefix are not getting searched. And also when the custom order number plugin is active, the order numbers are not getting searched.
Steps to replicate:
Then, try deactivating the plugin, and search for any order, you will find that particular order which is being searched.
Ticket Link: https://tychesoftwares.freshdesk.com/a/tickets/11661
Describe the bug
The order number is missing, the woo_order page shows only prefix after the update.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Woo order id should be displayed with the prefix
2 clients have reported the same issue.
https://tychesoftwares.freshdesk.com/a/tickets/27490
https://tychesoftwares.freshdesk.com/a/tickets/27496
When the plugin is deleted, all the settings saved in the options table are retained as is.
Describe the bug
After upgrading to PHP 8, the Custom Order Numbers are not triggering.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should work fine with PHP 8.0.
Note: The same issue we do have in the CON Pro repository. https://github.com/TycheSoftwares/custom-order-numbers-for-woocommerce-pro/issues/87
The order numbers are not updated accordingly.
The subscription order and the renewal orders have the same custom order number as of the parent order.
Attaching video of the settings: https://drive.google.com/a/tychesoftwares.com/file/d/17EDRLhK15BH0bPcsgPxrNCE4nrNix0yZ/view?usp=drivesdk
Attaching a screenshot of an order: https://drive.google.com/a/tychesoftwares.com/file/d/1uvfpiTOoLnH2CuPnO7TLHVyRpHrWzYGq/view?usp=drivesdk
Describe the bug
We are using prefix ORG- for our orders here, and a typical order looks like this: ORD-78271
And I can find such order on our admin, but not via order tracking: https://bestdealtoday.org/order-tracking/
On order tracking I find the tracking if I remove the prefix (leaving order ID)
To Reproduce
The issue is getting replicated on client's site only.
See the video: https://watch.screencastify.com/v/c2tSzJLNtm44kIKn8m0V
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/34890
The client is having an issue where the order numbers are not getting searched when the plugin is active.
I have tried by deactivating the Custom order numbers plugin, and the order numbers are getting searched.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/17044
Describe the bug
The order number is not in sequence while we create new order manually.
To Reproduce
Steps to reproduce the behavior:
I have tried with PHP 8.2.
Settings -
https://prnt.sc/XxERjRiY6Dn-
https://prnt.sc/hmS8AKL7S67x
Additional context
https://wordpress.org/support/topic/order-number-will-randomly-go-back-to-original-order-id/
Describe the bug
The issue is with the Kiwiz Invoice plugin. The order number shown in the Invoice is different than the orde number shown after placing the order.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The order number should be the same on the invoice and on the order page.
Screenshots
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/22721
The client has shared a solution for the duplicate order numbers for Subscription renewals.
There’s currently a bug (again) where all renewal orders will receive the order number of their parent subscription. That means there will be a bunch of renewal orders with duplicate numbers. I can see from changelog that this was fixed a while back, but the problem still persists.
I needed this solved ASAP so I fixed it myself. WooCommerce Subscriptions has a function (wcs_copy_order_meta()) that copies metadata from subscription to renewal orders and that’s the cause of this problem. I don’t know if a similar thing caused the problem in the past, but here’s what I did for the fix:
function remove_order_numbering_wcs_order_meta( $meta, $to_order, $from_order )
{
$to_order_type = get_post_type( $to_order->ID );
$from_order_type = get_post_type( $from_order->ID );
if ( $to_order_type == 'shop_order' && $from_order_type == 'shop_subscription' ) {
foreach ( $meta as $key => $value ) {
if ( $value['meta_key'] == '_alg_wc_custom_order_number' ) {
unset( $meta[$key] );
return $meta;
}
}
}
return $meta;
}
add_filter( 'wcs_renewal_order_meta', 'remove_order_numbering_wcs_order_meta', 10, 3 )
```;
Link: https://wordpress.org/support/topic/duplicate-order-numbers-for-subscription-renewals/
Need to update the WooCommerce tested up to tag.
The client is having an issue when the older orders are getting updated, the order numbers are getting changed and it is breaking the sequence of the order numbers.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/13661
Describe the bug
Notice message is not dismissible with PHP 8.2
To Reproduce
Steps to reproduce the behavior:
Additional context
https://wordpress.org/support/topic/can-not-dismiss-admin-message-database-updated-successfully-for-v1-4-1/
Error: PHP Warning: Undefined variable $admin_choice in /wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php on line 471
Describe the bug
The orders are not tracked on the Order tracking form with the custom order number when 'Enable order tracking by custom number' setting is enabled.
To Reproduce
Steps to reproduce the behavior:
Enable 'Enable order tracking by custom number' setting.
Visit the Order Tracking form which can be created using a shortcode [woocommerce_order_tracking]
3.Enter the required details like custom order number and the billing email address
And then See error
Expected behavior
Order should be tracked even with the custom order number when the mentioned setting is enabled.
Screenshots or Video
https://prnt.sc/nybskd , https://prnt.sc/nybt0o , https://prnt.sc/nybtc0
Describe the bug
Old orders don't query the correct orders when search by id anymore. Here is the screenshot: https://prnt.sc/1jr5jsr
To Reproduce
I'm able to replicate the issue on client's site only.
Setup screenshot: https://prnt.sc/1jr4lkn
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/31404
Some description should be there like what does this Renumerate Order Tools button do so that the customers can easily understand that feature.
Screenshot: https://prnt.sc/tfrn2r
The client has shared a fix where the renumerate numbers do not renumber the past subscriptions.
The “Renumerate” tool (that is clunky English – it would be better called “Renumber”) does not renumber past Subscriptions.
When a new subscription is taken out, the parent order and the subscription are correctly given sequential numbers by your plugin, just as they would have without it. But the Renumerate tool only renumbers the parent orders, leaving the subscriptions alone. That could cause a future subscription or order to end up with the same number as a past subscription.
The following simple change will fix the problem:
--- a/includes/class-alg-wc-custom-order-numbers-core.php
+++ b/includes/class-alg-wc-custom-order-numbers-core.php
@@ -259,7 +259,7 @@ if ( ! class_exists( 'Alg_WC_Custom_Order_Numbers_Core' ) ) :
$block_size = 512;
while ( true ) {
$args = array(
'post_type' => 'shop_order',
'post_type' => array('shop_order', 'shop_subscription'),
'post_status' => 'any',
'posts_per_page' => $block_size,
'orderby' => 'date',``
Link: https://wordpress.org/support/topic/renumerate-tool-and-subscriptions/#post-13842603
Describe the bug
When we save the CON settings page, a critical error message comes of memory size exhausted.
This error comes because every time when we save the settings it updates the database base even though the prefix/suffix is not changed.
It should not update the database if the prefix/suffix is not been changed.
Note: This issue is not been replicated on our site.
Expected behavior
No error should come on saving the settings page.
https://wordpress.org/support/topic/search-for-order-number-not-working/
Describe the bug
The Custom Order Numbers for WooCommerce plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 1.4.0. This is due to missing or incorrect nonce validation on a function. This makes it possible for unauthenticated attackers to perform unauthorized actions via a forged request, granted they can trick a site administrator into performing an action such as clicking on a link.
Within the Wordfence Scan Wordfence said:
The Plugin "Custom Order Numbers for WooCommerce" has a security vulnerability.
Vulnerability Information: https://www.wordfence.com/threat-intel/vulnerabilities/id/7d19800a-bff3-414f-a809-0159f49d263a?source=plugin
Additional context
https://wordpress.org/support/plugin/custom-order-numbers-for-woocommerce/
Describe the bug
With the above setup, & while Renumerating the orders, I got the following error
Fatal error: Uncaught Error: Call to a member function get_date_created() on bool in /home/team-sandbox/public_html/chetna/wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php:1012 Stack trace: #0 /home/team-sandbox/public_html/chetna/wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php(792): Alg_WC_Custom_Order_Numbers_Core->add_order_number_meta() #1 /home/team-sandbox/public_html/chetna/wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php(714): Alg_WC_Custom_Order_Numbers_Core->renumerate_orders() #2 /home/team-sandbox/public_html/chetna/wp-includes/class-wp-hook.php(308): Alg_WC_Custom_Order_Numbers_Core->create_renumerate_orders_tool() #3 /home/team-sandbox/public_html/chetna/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #4 /home/team-sandbox/public_html/chetna/wp-includes/plugin.php(517): WP_Hook->do_action() #5 /home/team-sandbox/public_h in /home/team-sandbox/public_html/chetna/wp-content/plugins/custom-order-numbers-for-woocommerce/includes/class-alg-wc-custom-order-numbers-core.php on line 1012
There has been a critical error on this website. Please check your site admin email inbox for instructions.
The issue is that the order numbers are not getting searched after we click on the Renumerate orders button.
Issue Link: https://wordpress.org/support/topic/cant-search-for-orderid/#post-13144437
Warnings present in \includes\class-alg-wc-custom-order-numbers-core
These warnings have not yet been removed as extensive testing is needed before changing.
Describe the bug
when the customer gets a transactional email (template designed in Send In Blue), it’s getting the default WooCommerce order number, not the custom order number which start ONLI-xxxxx.
To Reproduce
I'm also able to replicate this on the staging site.
Steps to reproduce the behavior:
Additional context
https://wordpress.org/support/topic/send-in-blue-not-utilizing-con-on-transactional-emails/
Describe the bug
Critical error message comes when users have a large number of orders & the plugin tries to update them.
To Reproduce
Steps to reproduce the behavior:
see the screenshot: https://www.screencast.com/t/TdzCNwr13M6e
Expected behavior
No critical error message should appear.
Q: In the third-party plugin, how to use the custom order numbers instead of WooCommerce Order Number?
In the Custom Order Numbers Lite/PRO plugin, we maintain the original order ID created by WooCommerce in the database. This order ID is crucial for various core functions and is utilized by multiple plugins and themes.
To implement custom order numbers, kindly reach out to the support team of the third-party plugin that you are using. Request them to make the required adjustments in their codebase, specifically in the sections where the Order ID is retrieved. They should incorporate the below code for Custom Order Numbers instead of the existing code associated with the Order ID.
Here is the code they will need.
$custom_order_number = $order->get_order_number(); //where $order is an order object
Describe the bug
There is an error message coming while downloading or seeing an invoice when our plugin is activated.
To Reproduce
Invoice plugin (3 attachments: documents, template and WooCommerce), rest of setting are for pro or contact address etc.
Custom order numbers (files with part1, 2 and 3)
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/37349
The client wants to set the width of the order number when the order number is set to pseudorandom.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/19969
Describe the bug
What are the clients saying:
We are using WooCommerce version 5.1.0 and WordPress version 5.6.2. In the admin when searching by order number the older items do not appear. Items from the first few pages do. Could this be related to your plugin? I can’t turn it off for testing because it’s a high volume shop.
After running the database update, only new orders are searchable.
Using Version 1.3.1.
We were able to resolve this and regain the search function by downgrading to the Plugin Version 1.2.12 via the advanced view here:
https://wordpress.org/plugins/custom-order-numbers-for-woocommerce/advanced/
The solution would be:
The issue is coming due to the new meta which is not present in the old orders. To prevent this problem, we will be showing an admin notice to run a script so that the new meta key will be added in those orders where the new meta key is not present.
Additional context
https://wordpress.org/support/topic/search-for-order-number-not-working/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.