Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Networking/Networking/Remote/MediaRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public extension MediaRemote {

private enum ParameterKey {
static let pageNumber: String = "page"
static let pageSize: String = "number"
static let pageSize: String = "per_page"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @hafizrahman! I will wait for @hichamboushaba to review this.


I am jumping in as this parameter key change will affect both loadMediaLibrary and loadMediaLibraryFromWordPressSite methods in this MediaRemote file.

The number parameter key is from the following documentation. https://developer.wordpress.com/docs/api/1.2/get/sites/%24site/media/

Please make sure to test the following login cases and update the PR testing instructions accordingly.

  1. Jetpack
  2. JCP
  3. No Jetpack. (Application password)

I am afraid that one of the above cases could be broken/affected by this change.


Nice to have: It would be nice to add a unit test to ensure that the parameter key is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch, I tested in WordPress.com console and indeed it wants number. Let me refactor this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 7215568

Good for another review.

static let wordPressMediaPostID: String = "post"
static let altText: String = "alt"
static let wordPressAltText: String = "alt_text"
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [*] Menu tab > Payments: in the "deposits" summary view at the top, all mentions of "deposits/deposit/deposited" have been renamed to "payouts/payout/paid out" respectively to match the renaming in web. [https://github.com/woocommerce/woocommerce-ios/pull/14402]
- [*] Receipts: Added message confirming receipt sent to customer after successful payment. [https://github.com/woocommerce/woocommerce-ios/pull/14390]
- [internal] Simplifies App Icon by only using a single image for all supported platforms. [https://github.com/woocommerce/woocommerce-ios/pull/14429]
- [**] Media Library: On sites logged in with application password, when picking image from WordPress Media Library, all images will now load correctly. [https://github.com/woocommerce/woocommerce-ios/pull/14444]

21.1
-----
Expand Down