Merge pull request #22051 from woocommerce/fix/22000
Check product exists before getting title
This commit is contained in:
commit
da52295e77
|
@ -1588,7 +1588,7 @@ if ( ! function_exists( 'woocommerce_quantity_input' ) ) {
|
|||
'step' => apply_filters( 'woocommerce_quantity_input_step', 1, $product ),
|
||||
'pattern' => apply_filters( 'woocommerce_quantity_input_pattern', has_filter( 'woocommerce_stock_amount', 'intval' ) ? '[0-9]*' : '' ),
|
||||
'inputmode' => apply_filters( 'woocommerce_quantity_input_inputmode', has_filter( 'woocommerce_stock_amount', 'intval' ) ? 'numeric' : '' ),
|
||||
'product_name' => $product->get_title(),
|
||||
'product_name' => $product ? $product->get_title() : '',
|
||||
);
|
||||
|
||||
$args = apply_filters( 'woocommerce_quantity_input_args', wp_parse_args( $args, $defaults ), $product );
|
||||
|
|
Loading…
Reference in New Issue