Add_action in my order with diferents url


I´m trying add action button in my order Woocomerce with this

function sv_add_my_account_order_actions( $actions, $order ) {

     $actions['name'] = array( 'url'  => 'http://localhost/wordpress/','name' => 'The Button Text',);
     return $actions;  

add_action( ‘woocommerce_my_account_my_orders_actions’, ‘sv_add_my_account_order_actions’, 10, 2 );

it works fine, but I want change the url with different url accoding to product_id purshcase and I dont know how to make this. I need help.

Egme Esquivel 4 months 0 Answers 6 views 0

Leave an answer