byt3w4rri0r
Forum Replies Created
-
Forum: Reviews
In reply to: [All-in-One WP Migration and Backup] Let downHey,
You probably know that you can exclude media files, which are likely the largest part of your website. You could create two backups: one with the media files and one without. Use the one without media to import your site, and use this tool (https://github.com/ofhouse/wpress-extract) to extract the .wpress files like a zip file. Then, upload the media folder via FTP. This way, you can at least import your website again.
Best regards.
Forum: Reviews
In reply to: [All-in-One WP Migration and Backup] Dishonest developersHey,
I haven’t had the same problem. In the last 3 days, I’ve successfully moved 8 websites using the Unlimited extension, even with backups as large as 8 gigabytes. You might want to try unpacking the .wpress file using this tool (https://github.com/ofhouse/wpress-extract) to check if your .wpress files are damaged.For me, it works perfectly. I assume you’ve checked the usual issues, like making sure there’s enough storage space for the file and the unpacked data, and that the website is correctly set up on the server?
This code snippet is a combination of actions and filters in WordPress that performs several tasks related to tracking orders in WooCommerce.
The
add_action
function is used to add an action hook when the order status changes, as well as when a post is loaded or edited. These hooks will trigger thecheck_private_order_notes
function.In the
check_private_order_notes
function, it first checks if the current screen is a shop_order post type and then retrieves the order ID. It then retrieves private order notes for that order and searches for specific text strings using a regular expression. If a match is found, it extracts the tracking number and tracking URL and updates custom fields for that order with this information.The
add_filter
function is used to add a custom column called “Tracking Number” to the Orders page in the WordPress backend. Theadd_tracking_number_column
function loops through the existing columns and adds the custom column after the “Order Status” column.Finally, the
manage_shop_order_posts_custom_column
action is used to display the tracking number and URL in the custom column. Theshow_tracking_number_in_column
function retrieves the custom fields for each order and creates a link with the tracking number and URL.Overall, this code enables store owners to track orders more efficiently by adding a custom column with tracking information and updating custom fields with tracking numbers and URLs.
// Diese Funktion wird ausgel?st, wenn sich der Bestellstatus ?ndert add_action('woocommerce_order_status_changed', 'check_private_order_notes', 10, 3); // Diese Funktion wird ausgel?st, wenn der Beitrag bearbeitet wird oder neu geladen wird add_action('load-post.php', 'check_private_order_notes'); add_action('load-post-new.php', 'check_private_order_notes'); add_action('edit_post', 'check_private_order_notes'); function check_private_order_notes() { $screen = get_current_screen(); if ($screen->post_type == 'shop_order' && $screen->base == 'post') { $order_id = $_GET['post']; $order = wc_get_order($order_id); // 1. Bestellnotizen abrufen und einer Variablen zuweisen $private_order_notes = wc_get_order_notes(['order_id' => $order_id, 'type' => 'internal', // Nur private Notizen abrufen ]); // 2. Durch die Notizen schlaufen und nach bestimmten Textzeichenfolgen suchen foreach ($private_order_notes as $note) { // 3. Tracking-Nummer und URL aus der Textzeichenfolge extrahieren if (preg_match('/shipment is: (\d+) and can be traced at: (https?:\/\/[^\s]+)/', $note->content, $matches)) { $tracking_number = $matches[1]; $tracking_number_url = html_entity_decode($matches[2]); // 4. Benutzerdefinierte Felder aktualisieren update_post_meta($order_id, 'custom_tracking_number', $tracking_number); update_post_meta($order_id, 'custom_tracking_number_url', $tracking_number_url); } } } } // 5. Benutzerdefinierte Spalte zur "Bestellungen" Seite im Backend hinzufügen add_filter('manage_edit-shop_order_columns', 'add_tracking_number_column'); function add_tracking_number_column($columns) { $new_columns = []; foreach ($columns as $column_name => $column_info) { $new_columns[$column_name] = $column_info; if ($column_name == 'order_status') { $new_columns['custom_tracking_number'] = __('Tracking Number', 'woocommerce'); } } return $new_columns; } // 6. Tracking-Nummer und URL in der benutzerdefinierten Spalte anzeigen add_action('manage_shop_order_posts_custom_column', 'show_tracking_number_in_column'); function show_tracking_number_in_column($column) { global $post; if ($column == 'custom_tracking_number') { $tracking_number = get_post_meta($post->ID, 'custom_tracking_number', true); $tracking_number_url = get_post_meta($post->ID, 'custom_tracking_number_url', true); echo '<a href="' . $tracking_number_url . '">' . $tracking_number . '</a>'; } }
Depending on the carrier, you may need to modify the “regEx” used to split the Order note at specific points.
Hi Sadia,
unfortunately the endoced “ampersand / &” inside the URL isn’t working, if you try to visit this link is gets scrambled but the UTM-Params are not recognized from google.
I did an duplicate Feed an sent the Link via eMail.
wbr LEo
Hi Sadia,
i deactivated the utm-params at the meantime, so our links will not be “scrambled” here are the screenshots you asked for.
My Settings: https://prnt.sc/J3ZU32gVHZhW
Output: https://prnt.sc/0NsQ8YJ9In2aas you see the “Output” gets an “encoded” ampersand…
i deactivated the UTM params again after the screenshots…wbr Leo
Forum: Plugins
In reply to: [Germanized for WooCommerce] Mehrsprachiger ShopHallo Vendidero,
Zuerst vielen dank für dein super Plugin!
Aber ich habe leider ein paar Probleme mit deinem Plugin in Verbindung mit WPML. Ich sehen du hast hier alles übersetzt und theoretisch sollte WPML alle Strings einfügen. Leider passiert es nun das gerade die Texte aus deinem Plugin nur in English angezeigt werden.
hier ein Link zu einem Screenshot:
Ist dir diese Problem vielleicht bekannt?
Vielen Dank!
Forum: Plugins
In reply to: [My Shortcodes] QuestionThank you very much! So i will buy it…
wbr leo