Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

Creating a State Policy aware action

Creating a State Policy aware action

Note: Before You Begin

Make sure that you have Creating a State Policy extension point in the plugin.

For a Commerce Manager action to be State Policies aware, it must extend AbstractPolicyAwareAction.

The getTargetIdentifier method must be implemented to return the unique identifier that will be used to map Creating a State Policy Contribution to this target.

public String getTargetIdentifier() {
    return targetIdentifier;
}