Plugin Directory

Changeset 2529135


Ignore:
Timestamp:
05/10/2021 01:50:37 PM (5 years ago)
Author:
pureclaritytechnologies
Message:

Version 3.1.2: Tweaking usage of SKU in feeds process & product context to make it optional

Location:
pureclarity-for-woocommerce/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pureclarity-for-woocommerce/trunk/includes/class-pureclarity-session.php

    r2403275 r2529135  
    168168            $data       = array(
    169169                'id'          => (string) $product->get_id(),
    170                 'sku'         => $product->get_sku(),
    171170                'category_id' => $category,
    172171            );
     172
     173            if ( $product->get_sku() ) {
     174                $data['sku'] = $product->get_sku();
     175            }
     176
    173177            wp_reset_postdata();
    174178            $this->current_product = $data;
     
    193197                    }
    194198                }
    195                 if ( $product->get_sku() ) {
     199                if ( $product->get_id() ) {
    196200                    return $product;
    197201                }
  • pureclarity-for-woocommerce/trunk/includes/feeds/class-pureclarity-feed.php

    r2477237 r2529135  
    274274        $product_data = array(
    275275            'Id'          => (string) $product->get_id(),
    276             'Sku'         => $product->get_sku(),
    277276            'Title'       => $product->get_title(),
    278277            'Description' => $product->get_description() . ' ' . $product->get_short_description(),
     
    284283        );
    285284
     285        if ( $product->get_sku() ) {
     286            $product_data['Sku'] = $product->get_sku();
     287        }
     288
     289
    286290        if ( $product->get_type() === 'external' && ! empty( $product->get_button_text() ) ) {
    287291            $product_data['ButtonText'] = $product->get_button_text();
     
    331335                $error[] = 'Prices';
    332336        }
    333         if ( ! array_key_exists( 'Sku', $product_data ) || empty( $product_data['Sku'] ) ) {
    334             $error[] = 'Sku';
    335         }
    336337        if ( ! array_key_exists( 'Title', $product_data ) || empty( $product_data['Title'] ) ) {
    337338            $error[] = 'Title';
     
    380381        foreach ( $product->get_available_variations() as $variant ) {
    381382
    382             $this->add_to_array( 'AssociatedSkus', $json, $variant['sku'] );
     383            $this->add_to_array( 'AssociatedIds', $json, $variant['variation_id'] );
     384            if ( isset( $variant['sku'] ) && ! empty( $variant['sku'] ) ) {
     385                $this->add_to_array( 'AssociatedSkus', $json, $variant['sku'] );
     386            }
    383387
    384388            $price         = $variant['display_price'] . ' ' . get_woocommerce_currency();
     
    415419            if ( ! empty( $child_product ) && $this->product_is_visible( $child_product ) ) {
    416420                $this->add_to_array( 'AssociatedIds', $json, $child_product->get_id() );
    417                 $this->add_to_array( 'AssociatedSkus', $json, $child_product->get_sku() );
     421                if ( $child_product->get_sku() ) {
     422                    $this->add_to_array( 'AssociatedSkus', $json, $child_product->get_sku() );
     423                }
    418424                $this->add_to_array( 'AssociatedTitles', $json, $child_product->get_title() );
    419425                $this->set_search_tags( $json, $child_product );
  • pureclarity-for-woocommerce/trunk/pureclarity.php

    r2507241 r2529135  
    88 * Description:  Use PureClarity's wide range of ecommerce personalisation features to create engaging online shopping experiences for your customers. Drive revenue, average order value, conversion rate and customer loyalty.
    99 * Plugin URI:   https://www.pureclarity.com
    10  * Version:      3.1.1
     10 * Version:      3.1.2
    1111 * Author:       PureClarity
    1212 * Author URI:   https://www.pureclarity.com/?utm_source=marketplace&utm_medium=woocommerce&utm_campaign=aboutpureclarity
     
    2121
    2222// Set version and path constants.
    23 define( 'PURECLARITY_VERSION', '3.1.1' );
     23define( 'PURECLARITY_VERSION', '3.1.2' );
    2424define( 'PURECLARITY_DB_VERSION', 1 );
    2525
  • pureclarity-for-woocommerce/trunk/readme.txt

    r2507241 r2529135  
    44Requires at least: 4.7
    55Tested up to: 5.6.1
    6 Stable tag: 3.1.1
     6Stable tag: 3.1.2
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    194194* Fixed an issue with shortcodes displaying to customers when in admin-only mode
    195195* Fixing undefined index error being logged on signup
     196
     197= 3.1.2 =
     198* Tweaking usage of SKU in feeds process & product context to make it optional
Note: See TracChangeset for help on using the changeset viewer.