Plugin Directory

Changeset 2010651


Ignore:
Timestamp:
01/11/2019 03:41:32 PM (7 years ago)
Author:
HappyKite
Message:

Fixing a Fatal Error
Tested and updated to WP 5.0.3

Location:
force-default-variant-for-woocommerce
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • force-default-variant-for-woocommerce/trunk/includes/variations.php

    r1994943 r2010651  
    8585    }
    8686   
     87    if ( $product->post_type !== 'product' ) {
     88        return $defaults;
     89    }
     90   
    8791    $respect = get_option( 'hpy_variant_respect' );
    8892    $sortby = get_option( 'hpy_variant_sort' );
     
    154158   
    155159    $_prod = wc_get_product( $attributes[0]['id'] );
     160   
     161    if ( empty( $_prod ) ) {
     162        return $defaults;
     163    }
     164   
    156165    $attr = $_prod->get_attributes();
    157166   
  • force-default-variant-for-woocommerce/trunk/readme.txt

    r1994943 r2010651  
    33Tags: WooCommerce, Variable product, WooCommerce variant, eCommerce
    44Requires at least: 4.2
    5 Tested up to: 5.0.1
    6 Stable tag: 1.4
     5Tested up to: 5.0.3
     6Stable tag: 1.4.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2929
    3030== Changelog ==
     31= 1.4.1 =
     32* FIX - Fixed a fatal error when variation does not exist.
     33* FIX - Fixed an error where type became unreadable.
     34
    3135= 1.4 =
    3236* NEW - The Stock Status will be checked before the variant is selected. You will no longer have an out of stock Default Variant
  • force-default-variant-for-woocommerce/trunk/woo-force-default-variant.php

    r1994943 r2010651  
    66Author: HappyKite
    77Author URI: http://www.happykite.co.uk/
    8 Version: 1.4
     8Version: 1.4.1
    99*/
    1010
     
    2626* includes
    2727***************************/
    28 
    2928include( dirname(__FILE__).'/functions.php' ); //Load Additional Functions
    3029include( dirname(__FILE__).'/includes/variations.php' ); //Variant code
Note: See TracChangeset for help on using the changeset viewer.