Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/class-wc-product-tables-backwards-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static function get_from_product_table( $args ) {
$data = array();
}

if ( empty( $data[ $args['column'] ] ) ) {
if ( ! isset( $data[ $args['column'] ] ) ) {
$escaped_column = '`' . esc_sql( $args['column'] ) . '`';
$data[ $args['column'] ] = $wpdb->get_col(
$wpdb->prepare(
Expand Down Expand Up @@ -311,7 +311,7 @@ public static function get_from_relationship_table( $args ) {

$data = wp_cache_get( 'woocommerce_product_backwards_compatibility_' . $args['type'] . '_relationship_' . $args['product_id'], 'product' );

if ( empty( $data ) ) {
if ( false === $data ) {
$data = array(
array(
$wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT object_id from {$wpdb->prefix}wc_product_relationships WHERE product_id = %d AND type = %s", $args['product_id'], $args['type'] ) ),
Expand Down