Need Variation SKU to be Product EAN + variation ID

Forums EAN and Barcodes for WooCommerce Need Variation SKU to be Product EAN + variation ID

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #127548
    Moshtafizur
    Participant

    Hi  Nanette,

    I am really sorry to know you are experiencing problems.

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,

    Moshtafizur

    #127575
    Tom Anbinder
    Moderator
    Plugin Support

    Hi, Nanette,

    I believe we can solve your task with this PHP snippet:

    add_filter( 'woocommerce_product_variation_get_sku', function ( $sku, $variation ) {
        $parent = wc_get_product( $variation->get_parent_id() );
        return $parent->get_meta( '_alg_ean' ) . '_' . $variation->get_id();
    }, 10, 2 );

    Please give it a try and let me know what you think.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.