Plugin Directory

Changeset 3019700


Ignore:
Timestamp:
01/10/2024 08:31:22 AM (2 years ago)
Author:
extendago
Message:

Version 1.4.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extendago-wp-connection/trunk/includes/cronjob/class-extendago-cronjob-functions.php

    r3019318 r3019700  
    14151415                            $product = $product_change;
    14161416
     1417                            $remove_from_web = false;
     1418                            foreach( $product['attributes'] as $product_attribute ){
     1419                                foreach( $product_attribute as $attribute_key => $attribute_value ) {
     1420                                    if( ( $attribute_key == 'hide_from_web' && $attribute_value == '1' ) || ( $attribute_key == 'active' && $attribute_value == '0' ) ){
     1421                                        $remove_from_web = true;
     1422                                    }
     1423                                }
     1424                            }
     1425
    14171426                            // Delete producten met de optie "Hide form web"
    1418                             if(
    1419                                 isset($product['attributes'][1]['hide_from_web']) && $product['attributes'][1]['hide_from_web'] == '1'
    1420                                 ||
    1421                                 isset($product['active']) && $product['active'] == '0'
    1422                             ){
    1423                                 $total_products--;
    1424 
     1427                            if( $remove_from_web || isset($product['active']) && $product['active'] == '0' ){
    14251428                                $post_id = $this->functions->custom_get_product_id_by_sku($product_change['id'], $product_change['sku']);
    14261429                                if (isset($post_id) && !empty($post_id)) {
Note: See TracChangeset for help on using the changeset viewer.