Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. // definir metodo de entrega
  2. add_filter( 'woocommerce_shipping_rate_method_id', 'custom_rate_method_id', 80, 2 );
  3. function custom_rate_method_id( $rate_id, $rate ) {
  4.   if ( 'wc_table_shipping' === $rate_id) {
  5.     $rate_id = 'wcts_' . $rate->get_instance_id();
  6.   }
  7.   return $rate_id;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement