Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use recommended order currency API for multicurrency subscription renewal | switch | resubscribe #4228

Merged
merged 26 commits into from
Jun 29, 2022

Commits on May 4, 2022

  1. use recommended WC_Order::get_currency() for getting renewal currency:

    - previously used raw `get_post_meta()`
    - this is no longer recommended, and could break on stores using
    (forthcoming) custom order tables
    Rua Haszard committed May 4, 2022
    Configuration menu
    Copy the full SHA
    e154bb3 View commit details
    Browse the repository at this point in the history
  2. add changelog

    Rua Haszard committed May 4, 2022
    Configuration menu
    Copy the full SHA
    14eb4e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a78530 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2022

  1. Configuration menu
    Copy the full SHA
    e01a19c View commit details
    Browse the repository at this point in the history

Commits on May 9, 2022

  1. convert id to order/subscription object before calling get_currency:

    - fix logic issue in previous commit
    Rua Haszard committed May 9, 2022
    Configuration menu
    Copy the full SHA
    20ea6b0 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Configuration menu
    Copy the full SHA
    dfbde74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c433f4e View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'origin/fix/4152-subscribe-renew-multicu…

    …rrency-order-meta-api' into fix/4152-subscribe-renew-multicurrency-order-meta-api
    Rua Haszard committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    bc31724 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Configuration menu
    Copy the full SHA
    23ec842 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. fix override_selected_currency test for renewal case:

    - Make a real order with non-default currency - integration test style.
    - Enhance mock_wcs_cart_contains_renewal so test can customise
      product and renewal order ids.
    - Mock the real order instead of hacking post meta (legacy implementation detail).
    - Fix up all uses of mock_wcs_cart_contains_renewal() for new signature.
    Rua Haszard committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    4b733df View commit details
    Browse the repository at this point in the history
  2. Repair multicurrency sub switch unit test:

    - Rename / update comment to clarify test scope.
    - Mock up a real order (aka subscription) with custom currency.
    - Mock that order idea in $_GET request params.
    Rua Haszard committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    37bb933 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2022

  1. repair multicurrency subs switch in cart unit test:

    - use WC_Order for mock subscription
    - mock subscription and cart APIs as needed
    Rua Haszard committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    053bf3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f45d6b9 View commit details
    Browse the repository at this point in the history
  3. repair multicurrency sub resubscribe unit test:

    - parameterise wcs_get_order_type_cart_items so can use real order id
    - mock sub (order) and wcs_get_subscription to return mocked sub
    - it's fine right
    Rua Haszard committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    3d97600 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a1cfc8 View commit details
    Browse the repository at this point in the history
  5. remove extraneous whitespace / php linter fixes

    Rua Haszard committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    02cf94e View commit details
    Browse the repository at this point in the history
  6. add local wrapper for wcs_get_subscription() – attempt psalm fix:

    - ERROR: UndefinedFunction
    $switch_subscription = wcs_get_subscription( $switch_cart_item['subscription_switch']['subscription_id'] );
    Rua Haszard committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    1dda55e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b21922a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    73780a4 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2022

  1. Configuration menu
    Copy the full SHA
    d3eeea8 View commit details
    Browse the repository at this point in the history
  2. remove incorrect return type (array) from get_subscription test helper +

    + clarify true type in docblock comment
    Rua Haszard committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    76365db View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'origin/fix/4152-subscribe-renew-multicu…

    …rrency-order-meta-api' into fix/4152-subscribe-renew-multicurrency-order-meta-api
    Rua Haszard committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    9290953 View commit details
    Browse the repository at this point in the history
  4. remove whitespace offending the linter

    Rua Haszard committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    6c139f6 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2022

  1. Configuration menu
    Copy the full SHA
    91cfcc0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a5ccf31 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Merge remote-tracking branch 'origin/fix/4152-subscribe-renew-multicu…

    …rrency-order-meta-api' into fix/4152-subscribe-renew-multicurrency-order-meta-api
    Rua Haszard committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    98afc22 View commit details
    Browse the repository at this point in the history