pippijn
Forum Replies Created
-
For me too. I rolled back to version 4.2.7.1 and the websites are visible again
@msarikaya I rolled the plugin back to v.7.3.0 which is working fine
Forum: Plugins
In reply to: [Gift Cards for WooCommerce] No shipping costs are calculated for productsCan I say I love the fast response and i’ll test the new update asap. All programmers could learn alot from you! 5 stars from me
We have the same issue. It used to work before v2.0.0
Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingthis is the contents of custom_code.php:
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } // Example for the short code [woo_mb_custom_code type="tracking-code"] if(isset($attr['type']) && $attr['type'] == 'tracking-code'){ //do_shortcode('[pr_dhl_tracking_link order_id="'. $order->get_id().'"]'); $tracking_urls = get_dhl_parcel_urls($order->get_id()); if ($tracking_urls){ foreach($tracking_urls as $tracking_url) { printf('<a href="%s">Track & Trace - %s</a><br>', $tracking_url['url'], $tracking_url['code']); } } }Use this shortcode where you want the tracking url:
[woo_mb_custom_code type=”tracking-code”]Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingYou’ll have to add a custom tag. Follow this guide:
https://docs.flycart.org/en/articles/1478810-how-to-add-custom-short-code-in-your-email-templatesForum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingThis is the function I use to get the T&T urls:
function get_dhl_parcel_urls( $order_id ) { if ( $order_id ){ $locale = str_replace('_', '-', get_locale()); $order = wc_get_order($order_id); if ( ! $order ){ return false; } $address = $order->get_address('shipping') ?: $order->get_address(); $postcode = wc_format_postcode($address['postcode'], $address['country']); $labels = get_post_meta($order_id, '_dhlpwc_order_labels', true); if (!is_array( $labels )) { return false; } $tracking_codes = array(); foreach($labels as $label) { if (array_key_exists('tracker_code', $label) && empty($label['is_return'])) { $tracking_codes[] = $label['tracker_code']; } } $tracking_codesets = array(); foreach($tracking_codes as $tracking_code) { $tracking_codeset = array(); $tracking_codeset['url'] = get_tt_url($tracking_code, $postcode, $locale); $tracking_codeset['code'] = $tracking_code; $tracking_codesets[] = $tracking_codeset; } return $tracking_codesets; } else { return false; } } function get_tt_url($tracking_code = null, $postcode = null, $locale = null){ $url = 'https://www.dhlparcel.nl/nl/volg-uw-zending-0'; $query_args = array(); if ($tracking_code !== null) { $query_args['tt'] = urlencode($tracking_code); } if ($postcode !== null) { $query_args['pc'] = urlencode($postcode); } if ($locale !== null) { $query_args['lc'] = urlencode($locale); } return add_query_arg($query_args, $url); }Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] Fatal error: Allowed memory sizeYes v1.1.9 is working again
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] Fatal error: Allowed memory sizeI experienced the same on 8 of our websites. There seems to be a memory leak in v1.1.8. I rolled back to v1.1.7 and everything is working again. I’d recommend to not install this version and wait for a fix.
Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingThank you! I figured it out
Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingIs there no way of adding t&t to the email? All I need is a function call for the url. I’ll create the note myself.
Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingWe use DHL Parcel.
I did try to include the string {pr_dhl_tracking_note}, but it just shows {pr_dhl_tracking_note} in the email.
Forum: Plugins
In reply to: [DHL Shipping Germany for WooCommerce] Shortcode is not workingCountry is Netherlands and i’m trying to add the t&t to emails. Because we use Flycart WooCommerce Email Customizer with Drag and Drop Email Builder, the default action “woocommerce_order_details_after_order_table_items” is not called.
I wrote a php snippet to test the pr_dhl_tracking_link shortcode, but that doesn’t work either:
add_action( 'wp_loaded','test_code' ); function test_code() { echo do_shortcode('[pr_dhl_tracking_link product_id="12345"]'); }I also found this code on the support forum:
echo PR_DHL()->get_pr_dhl_wc_order()->get_dhl_label_tracking( '12345' );
But that gives the error “Class ‘PR_DHL_API_Factory’ not found in …/public_html/wp-content/plugins/dhl-for-woocommerce/pr-dhl-woocommerce.php:391”