Merge pull request #16489 from aj-adl/master

Add filter to woocommerce_order_again_button to match WC_Form_Handler
This commit is contained in:
Claudio Sanches 2017-08-17 13:55:49 -03:00 committed by GitHub
commit bf81af778b
1 changed files with 1 additions and 1 deletions

View File

@ -1900,7 +1900,7 @@ if ( ! function_exists( 'woocommerce_order_again_button' ) ) {
* @subpackage Orders
*/
function woocommerce_order_again_button( $order ) {
if ( ! $order || ! $order->has_status( 'completed' ) || ! is_user_logged_in() ) {
if ( ! $order || ! ! $order->has_status( apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( 'completed' ) ) ) ) || ! is_user_logged_in() ) {
return;
}