wordpress-sdk icon indicating copy to clipboard operation
wordpress-sdk copied to clipboard

Inconsistency with the passing of the 2nd argument from do_action to the method/function that is hooked on the relevant hook when it is an array with only 1 item and the item is an object

Open fajardoleo opened this issue 6 years ago • 0 comments

Actual Behavior:

  • What is the issue? (*)

Passing a single-item array (with an object as the only item) as the 2nd argument to $this->do_action( 'after_plans_sync', $plans ) will actually pass the object as the 2nd argument to the method/function that is hooked on the after_plans_sync hook.

  • What is the expected behavior?

$plans should be passed to the relevant method as an array even if it has only 1 item.

Versions: (*)

  • Freemius SDK Version: 2.2.4
  • WordPress Version: 5.1.1
  • PHP Version:

Plugin / Theme: (*)

  • Name:
  • Slug:
  • Freemius ID:

Additional Information:

  • Browser Type: (*)
  • Browser Version: (*)
  • OS: (*)
  • Stack Traces:

fajardoleo avatar Apr 29 '19 15:04 fajardoleo