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

Update filter name for customizing the query arguments used to fetch the courses a user is enrolled in #3369

Merged
merged 1 commit into from Jul 8, 2020

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented Jul 8, 2020

Changes proposed in this Pull Request

After reviewing #3347, I realized that the filter should be called sensei_learner_enrolled_courses_args to be consistent with the other hooks in this class.

Testing instructions

  • Add the following snippet:
add_filter(
	'sensei_learner_enrolled_courses_args',
	function( $args, $user_id ) {
		error_log( $user_id);
		error_log( print_r($args,true) );

		return $args;
	},
	10,
	2
);
  • Navigate to 'My courses' page and observe that the arguments are logged.

New/Updated Hooks

  • sensei_learner_enrolled_courses_args - Customize the query arguments used to fetch the courses a learner is enrolled in.

@donnapep donnapep added this to the 3.3.0 milestone Jul 8, 2020
@donnapep donnapep self-assigned this Jul 8, 2020
@donnapep donnapep requested a review from gikaragia July 8, 2020 13:29
@donnapep donnapep added the Hooks This change adds or modifies one or more hooks. label Jul 8, 2020
Copy link
Contributor

@gikaragia gikaragia left a comment

Choose a reason for hiding this comment

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

Looks good!

@donnapep donnapep merged commit 5ba6870 into master Jul 8, 2020
@donnapep donnapep deleted the update/filter-name branch July 8, 2020 13:57
@donnapep donnapep changed the title Update filter name for consistency Update filter name for customizing the query arguments used to fetch the courses a user is enrolled in Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hooks This change adds or modifies one or more hooks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants