• Resolved alfab

    (@alfab)


    Hi guys, everything was perfect until 2 days ago:
    when I select Shipping provider, insert tracking number, flag “Mark as Shipped” and press “Save Tracking”, the page reload itself but the tracking number is not saved and the order status does not change from “processing” to “shippend”.
    Can you please help me?
    thank you
    fabio

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Zorem

    (@zorem)

    Hi, can you remember what was changed/updated on your website 2 days ago and a few days before?

    Thread Starter alfab

    (@alfab)

    Hi @zorem,
    thank you for your prompt reply. I forgot to say that everything works well if I insert the tracking code from the page with ALL orders (woocommerce –> Orders) by clicking on the icon. But It doesn not work if I enter into the order itself to add the tracking info.
    All I did these days was to add this plugin https://it.ww.wp.xz.cn/plugins/woocommerce-pdf-invoices-packing-slips/ but I tried to deactivate it, the problem still persist.
    Tell me if you need more info.
    thank you
    fabio

    Thread Starter alfab

    (@alfab)

    Sorry,
    i forgot to say to you that my programmer made some change in pdf plugin and I inserted them into the child theme
    this is the code:

    /* INIZIO SEZIONE DI MODIFICA COMPORTAMENTO FATTURE */
    /**
    * @param $tag
    * @param $function
    * @param int $priority
    * @return int|string
    */
    function getKeyToRemove($tag, $function, $priority = 10){
    global $wp_filter;
    if(isset($wp_filter[$tag])){
    if(isset($wp_filter[$tag]->callbacks[$priority])){
    foreach($wp_filter[$tag]->callbacks[$priority] as $key => $value){
    if(strpos($key, $function)){
    return $key;
    }
    }
    }
    }
    }

    // Rimuovo le callback Lato FrontEnd per le azioni del cliente
    // vedi __construct di wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-frontend.php
    remove_filter(“woocommerce_my_account_my_orders_actions”, getKeyToRemove(“woocommerce_my_account_my_orders_actions”, “my_account_pdf_link”));
    remove_filter(“woocommerce_api_order_response”, getKeyToRemove(“woocommerce_api_order_response”, “woocommerce_api_invoice_number”));
    remove_shortcode( “wcpdf_download_invoice” );

    // rimuovo il filtro che genera la fattura come allegato all’email per il cliente alla chiusura dell’ordine
    // vedi wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php riga 21
    remove_filter(“woocommerce_email_attachments”, getKeyToRemove(“woocommerce_email_attachments”, “attach_pdf_to_email”, 99), 99);

    //modifico il comportamento del metabox di admin
    // vedi wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-admin.php
    // riga 370 e seguenti
    add_action(“wpo_wcpdf_meta_box_start”, function($param){
    global $wpdb;
    $tablename = “{$wpdb->prefix}wcpdf_invoice_number”;
    $query = “SELECT * FROM $tablename WHERE order_id = $param”;
    $result = $wpdb->query($query);
    if($result > 0){
    //la fattura esiste già per questo ordine
    return;
    }else{
    // in questo caso la fattura non esiste,
    // qui serve la die, perché se il codice prosegue, la crea automaticamente
    echo FATTURA_ASSENTE;
    die();
    }
    });
    //qui sotto definisci la frase che preferisci in caso di fattura assente
    define(‘FATTURA_ASSENTE’, “Fattura non presente per questo ordine”);

    /* FINE SEZIONE DI MODIFICA COMPORTAMENTO FATTURE */

    thank you

    Plugin Author Zorem

    (@zorem)

    Hi, every WP install is different and there are many variables, I do not see any problem in general with the add tracking info option on a single order page, you will need to do further check your website, deactivate all plugins besides WC and AST, check if the issue is resolved, you need to activate the plugins one by one to find out which plugin creates the issue.
    Let me know how it goes

    Plugin Author Zorem

    (@zorem)

    Hi, let me know if you need further assistance

    Thread Starter alfab

    (@alfab)

    Hi @zorem,
    seems to work now. Thank you for tour assistance!
    best
    fabio

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Cannot memorize tracking numbers’ is closed to new replies.