This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Agregar botón en el listado de pedidos de mi cuenta para poder repetir pedido | |
add_filter( 'woocommerce_my_account_my_orders_actions', 'wcfb_add_order_again_aciton', 10, 2 ); | |
function wcfb_add_order_again_aciton( $actions, $order ) { | |
if ( ! $order || ! $order->has_status( 'completed' ) || ! is_user_logged_in() ) { | |
return; | |
} | |
// Backward compatibility WC < 3.0.0 | |
if ( version_compare( WC()->version, '3.0.0', '<' ) ) { |
NewerOlder