Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • pretobrazza

    (@pretobrazza)

    Hello,
    I’m also still having the same issue (version 4.5.7) although the lines are slightly different (via Query Monitor):
    wp-content/plugins/webappick-product-feed-for-woocommerce/admin/class-woo-feed-admin.php:110
    Woo_Feed_Admin->enqueue_scripts()
    wp-includes/class-wp-hook.php:308
    do_action(‘admin_enqueue_scripts’)
    wp-admin/admin-header.php:118`

    Thread Starter pretobrazza

    (@pretobrazza)

    @macmaggy I’m using CTX feed (free version)

    Thread Starter pretobrazza

    (@pretobrazza)

    Thank you very much, Mehdi, everything is working fine now!

    I will certainly take your advice into account when thinking of staging a site.

    Kind regards,
    Bernard

    Thread Starter pretobrazza

    (@pretobrazza)

    Hi @chrism245

    I tried the script above and let it hang in functions.php of my child template for a few days but to no avail.

    So, I installed a free version of third party feed generator plugin and used it to produce a feed with a prepended gla_ product ID + (for starters) custom fields: GTIN(EAN), Brand and Gender. Then I added the xml as a supplemental feed in Google Merchant with the instruction to fetch it once a day.

    There a miracle happenned as the Gtin, Brand and Gender appeared almost instantly into your GLA Merchant feed. (with onlt 2 local gtin errors out of 1600+ products)

    I know this opens the door to completly switch over to the other feed generator I installed, but at this point in time I’m happy to ride 2 horses at once – fot the time being instead of messing around with code which doesn’t work.

    I’m curious to read your thoughts about this approach.

    Kind regards,
    Bernard

    Thread Starter pretobrazza

    (@pretobrazza)

    Hello @nicw,

    About half an hour after you responded I changed the ‘woocommerce_gla_product_attribute_value_GTIN’ to ‘woocommerce_gla_product_attribute_values’ as you suggested. In the process I changed some products which was picked up in the merchant center.

    Now, one day later, the GTIN is still not showing up in the merchant center at all.

    I’m not entirely sure how WP processes data which leaves me with the question whether functions.php really is the right place where I should place the filter.

    To be honest, I still want to give GLA a fair chance but somehow I slowly am looking to install a pro version of a third party feed generator so that (I suppose) I potentially will have full control of an array of places I can push my fully fledged feed through.

    On a young site it would be an additional expense over and above Yoast and it’s schema.org + XML feed and yet …

    Kind regards,
    Bernard

    • This reply was modified 2 years, 6 months ago by pretobrazza.
    • This reply was modified 2 years, 6 months ago by pretobrazza.
    Thread Starter pretobrazza

    (@pretobrazza)

    Hello @nicw,

    For anyone reading this thread, searching for a solution, there’s a small typo in the snippet above:
    return $gtin
    }
    Should be
    return $gtin;
    }
    (just a small typo error ?? )
    ____________________________

    Thank you for the snippet! I put it right under the one I use to complete the schema.org from yoast seo in the functions.php of my child template. I know for shure that the one for yoast works.

    The whole picture now looks like:

    add_filter( 'wpseo_schema_product', 'custom_set_extra_schema' );
    function custom_set_extra_schema( $data ) {
        global $product;
        
        $gtin        = get_post_meta( $product->get_id(), '_maxyzla_ean_number', true );
        $data['gtin13'] = $gtin;
        return $data;
    }
    
    add_filter( 'woocommerce_gla_product_attribute_value_GTIN' , 'my_custom_function', 10, 2 );
    function my_custom_function( $gtin, $product ){
    
    //make the magic happen here - something like?
    $my_new_gtin = get_post_meta( $product->get_id(), '_maxyzla_ean_number', true );
    
    //please make sure your new gtin is valid before switching the values
    $gtin = $my_new_gtin;
    
    return $gtin;
    }

    Afterwards I republished 3 products on my site and some minutes later merchant center picked up the change. In the GTIN column of merchant center the gtin stayed empty though.

    Is there something, I’m missing out?

    Kind regards ??

    • This reply was modified 2 years, 6 months ago by pretobrazza.
    • This reply was modified 2 years, 6 months ago by pretobrazza.
Viewing 6 replies - 16 through 21 (of 21 total)