‘skroutz’ === $feed_config[‘provider’] is not return True
-
the bellow function is not working correctly, i have create one skroutz xml file when i checked the code the bellow function is not working (same with the ‘bestprice’)
function woo_feed_availability_attribute_value_modify( $attribute_value, $product, $feed_config ) { if ( 'bestprice' === $feed_config['provider'] ) { if ( 'in stock' === $attribute_value ) { return 'Y'; } return 'N'; } if ( 'skroutz' === $feed_config['provider'] ) { if ( 'in stock' === $attribute_value ) { $in_stock_string = __( 'Delivery 1 to 3 days', 'woo-feed' ); } else { $in_stock_string = __( 'Delivery up to 30 days', 'woo-feed' ); } return $in_stock_string; } if ( 'pricerunner' === $feed_config['provider'] ) { if ( 'in stock' === $attribute_value ) { return 'Yes'; } return 'No'; } if ( 'google' === $feed_config['provider'] || 'pinterest' === $feed_config['provider'] ) { if ( 'on backorder' === $attribute_value || 'on_backorder' === $attribute_value ) { return 'preorder'; } if ( 'google' === $feed_config['provider'] ) { if ( ! in_array( $attribute_value, array( 'in_stock', 'out_of_stock', 'on_backorder' ) ) ) { return 'in_stock'; } } elseif ( ! in_array( $attribute_value, array( 'in stock', 'out of stock', 'on backorder' ) ) ) { return 'in stock'; } } if ( 'facebook' === $feed_config['provider'] ) { if ( 'on backorder' === $attribute_value ) { return 'available for order'; } elseif ( ! in_array( $attribute_value, array( 'in stock', 'out of stock', 'on backorder' ) ) ) { return 'in stock'; } } return $attribute_value; } }
the line ‘skroutz’ === $feed_config[‘provider’ and ‘bestprice’ === $feed_config[‘provider’] return false, but my file have tyme skroutz and the other bestprice.
why?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘‘skroutz’ === $feed_config[‘provider’] is not return True’ is closed to new replies.