• Hello,

    printing the label is not working with Error.

    Can you see what the issue is and how to solve it?

    Best regards

    Ein Fehler vom Typ E_ERROR wurde in der Zeile 632 der Datei /var/www/vhosts/******.de/shop.******.de/wp-content/plugins/dhl-for-woocommerce/includes/class-pr-dhl-wc-order-paket.php verursacht. Fehlermeldung: Uncaught Error: Call to a member function get_title() on bool in /var/www/vhosts/******.de/shop.******.de/wp-content/plugins/dhl-for-woocommerce/includes/class-pr-dhl-wc-order-paket.php:632 Stack trace: #0 /var/www/vhosts/******.de/shop.******.de/wp-content/plugins/dhl-for-woocommerce/includes/class-pr-dhl-wc-order-paket.php(806): PR_DHL_WC_Order_Paket->get_product_package_description() #1 /var/www/vhosts/******.de/shop.******.de/wp-includes/class-wp-hook.php(308): PR_DHL_WC_Order_Paket->override_item_desc_pr_shipping_dhl_label_args() #2 /var/www/vhosts/******.de/shop.******.de/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /var/www/vhosts/******.de/shop.******.de/wp-content/plugins/dhl-for-woocommerce/includes/abstract-pr-dhl-wc-order.php(305): apply_filters() #4 /var/www/vhosts/******.de/shop.******.de/wp-includes/class-wp-hook.php(308): PR_DHL_WC_Order->save_meta_box_ajax() #5 /var/www/vhosts/******.de/shop.******.de/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #6 /var/www/vhosts/******.de/shop.******.de/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /var/www/vhosts/******.de/shop.******.de/wp-admin/admin-ajax.php(188): do_action() #8 {main} thrown

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter condraw

    (@condraw)

    				break;
    			case 'product_name':
    				if ( $product->is_type('variation') ) {
    					$parent_product = wc_get_product( $parent_product_id );
    					$variation_title = wc_get_formatted_variation( $product, true, false );
    					$product_name = $parent_product->get_title().' : '.$variation_title;
    				} else {
    					$product_name = $product->get_title();
    				}
    				array_push( $desc_array, $product_name);
    				break;
    Thread Starter condraw

    (@condraw)

    Above I included the code around line 632 in question:

    $product_name = $parent_product->get_title().’ : ‘.$variation_title;

    Plugin Author Abdalsalaam Halawa

    (@abdalsalaam)

    it seems you tried to print a label for an order contains a variation product with a deleted parent product, but in this case, it should be ignored but for a reason the variation product still exist.

    to fix this, you should delete orphans products from WooCommerce settings :
    WooCommerce > Status > Tools > Delete Orphaned variations

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘label printing not possible with following Error’ is closed to new replies.