Skip to content

Fixes an issue where gf form notification cannot get form_id - #24

Closed
athaller wants to merge 1 commit into
gravityforms:masterfrom
athaller:master
Closed

athaller wants to merge 1 commit into
gravityforms:masterfrom
athaller:master

Conversation

@athaller

Copy link
Copy Markdown

Submitting this PR -- I came across this before but $notification_id always comes back as NULL causing no form notifications to update

The use-case I'm using is scripting notifications to turn on/off based on an env and a bash script with the form ID and notification ID's being passed in

e.g.,
BASH FILE:

functions

turn_off() {
local turn_on=("${@:2}")
local form_id=$1
for id in "${turn_on[@]}"; do
echo "Turning off: $id, $form_id"
wp gf notification update ${form_id} --notification-json="$(wp gf notification get ${form_id} ${id} | sed "s/"isActive":true/"isActive":false/g")"
done
}

Then I call the above function passing in the form id and an array of notification id's

Each time this occurs -- it gives the following error and $notification_id = NULL
"Notification not valid"

@athaller

Copy link
Copy Markdown
Author

Note:
Just realizing I submitted a PR already -- this is linked to
#20

@richardW8k

Copy link
Copy Markdown
Member

@athaller thanks for letting us know about this issue, we'll be fixing it with #25.

@richardW8k richardW8k closed this Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants