Skip to content

feat: Add support for condition single operator (no value)#187

Open
nlemoine wants to merge 1 commit intoStoutLogic:masterfrom
nlemoine:feat-single-operator
Open

feat: Add support for condition single operator (no value)#187
nlemoine wants to merge 1 commit intoStoutLogic:masterfrom
nlemoine:feat-single-operator

Conversation

@nlemoine
Copy link
Copy Markdown
Contributor

@nlemoine nlemoine commented Sep 7, 2024

Hey @stevep,

ACF is now providing some single operator (e.g. no mandatory value):

'conditional_logic' => array(
    array(
        array(
            'field' => 'field_66db320aef59b',
            'operator' => '==empty',
        ),
    ),
),

This PR adds support for them.

Since the LocationBuilder is extending the Conditionalbuilder, I had to make the LocationBuilder::createCondition compatible, hence the exception throw.

Let me know if this needs any changes.

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.

1 participant