WordPress / WordPress/wp-consent-level-api

Allow to set cookie path when setting cookies

Open Beginner friendly
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
92
Forks
36
Avg merge
2m
Merged PRs (30d)
7

Description

In multisite subdirectory mode, we need to have custom cookie path as per sub-site.
Currently the cookie path is hardcoded to "/" in this line: https://github.com/rlankhorst/wp-consent-level-api/blob/master/assets/js/wp-consent-api.js#L65

Need an optional param to allow setting path.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in assets/js/wp-consent-api.js at line 65, where the cookie path is hardcoded. Trace the cookie-setting entry point and determine how an optional path parameter should be passed; done means existing callers retain the root path while multisite subdirectory callers can use a custom path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.