Plugin Directory

Changeset 3089519


Ignore:
Timestamp:
05/20/2024 03:23:02 PM (23 months ago)
Author:
jnser
Message:

Updates product description push

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stan-checkout/trunk/includes/classes/class-wc-stan-checkout-api-wrapper.php

    r3077758 r3089519  
    153153            foreach ( $cart->get_cart() as $cart_item_key => $cart_item ) {
    154154                $product = $cart_item['data'];
     155                $product_instance = wc_get_product( $cart_item['product_id'] );
    155156                $line_item = array(
    156157                    "product_id" => strval( $cart_item['product_id'] ),
     
    159160                    "unit_price" => convert_monetary_value_to_integer( floatval( $product->get_price() ) ),
    160161                    "discount_amount" => convert_monetary_value_to_integer( floatval( $product->get_sale_price() ) ),
    161                     "description" => $product->get_description(),
     162                    "description" => wp_strip_all_tags( $product_instance->get_description() ),
    162163                    "sku" => $product->get_sku(),
    163164                    "product_url" => $product->get_permalink( $cart_item ),
    164165                );
    165                 $image_url = get_the_post_thumbnail_url( $product->get_id() );
     166                $image_url = get_the_post_thumbnail_url( $cart_item['product_id'] );
    166167                if ( $image_url ) {
    167168                    $line_item['image_url'] = $image_url;
Note: See TracChangeset for help on using the changeset viewer.