Skip to content

Commit b0718eb

Browse files
committed
fix URI#encode deprecation issue for Ruby 3+
1 parent 6433671 commit b0718eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/woocommerce_api/oauth.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_oauth_url
4242
params["oauth_timestamp"] = Time.new.to_i
4343
params["oauth_signature"] = CGI::escape(generate_oauth_signature(params, url))
4444

45-
query_string = URI::encode(params.map{|key, value| "#{key}=#{value}"}.join("&"))
45+
query_string = URI::encode_www_form(params)
4646

4747
"#{url}?#{query_string}"
4848
end

0 commit comments

Comments
 (0)