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

Conflict with GF Coupon add on Plugin #23

Closed
Pixelsmith opened this issue Apr 26, 2018 · 4 comments
Closed

Conflict with GF Coupon add on Plugin #23

Pixelsmith opened this issue Apr 26, 2018 · 4 comments

Comments

@Pixelsmith
Copy link

Pixelsmith commented Apr 26, 2018

Hi Danny,

Your plugin is awesome, but I've run into a conflict with it.

I'm using the Gravity Forms Coupon Add-On (https://www.gravityforms.com/add-ons/coupons/) and when I install the ACF/GF Add-On the coupon input field no longer appears in my forms. When I disable AFC/GF it appears again.

Edit: I also confirmed this bug is causing the 'Username' field to disappear.

I understand that you may not guarantee performance with optional add-ons, but I thought I'd let you know about the conflict, as it took me awhile to suss it out.

Thanks,
Adam

@nathanp
Copy link

nathanp commented Aug 30, 2019

@Pixelsmith I may have found a temporary workaround. In the /resources/Init.php file, I commented out line 10:
$this->addNotices();

This seems to have solved it for me, but I don't know if this will impact other areas of the plugin's functionality. So far it seems to be working for me.

n8kowald pushed a commit to n8kowald/acf-gravityforms-add-on that referenced this issue Sep 20, 2019
@n8kowald
Copy link

n8kowald commented Sep 20, 2019

I had a plugin conflict using Gravity Perks Nested Forms plugin: https://gravitywiz.com/documentation/gravity-forms-nested-forms

Fatal error: Uncaught Error: Call to undefined method GF_Field::get_item_label() in ...site/wp-content/plugins/gp-nested-forms/class-gp-nested-forms.php:1633

$this->addNotices() is getting and caching form meta fields too early (as soon as the plugin code is executed). Before our plugins have registered their own custom fields.
When our Gravity Form should be loading a custom field - in my case GP_Field_Nested_Form - it loads a GF_Field instead which causes issues as the custom field code is not defined.

The other thing I did was wrap two hooks (in Init.php) in an is_admin() check.

if ( is_admin() ) {
    add_action( 'acf/include_field_types', [ $this, 'addField' ] );
    add_action( 'acf/register_fields', [ $this, 'addFieldforV4' ] );
}

Here's a pull request that fixes all issues for me:
#29

@markhowellsmead
Copy link
Collaborator

@n8kowald @Pixelsmith @nathanp @joshlewis I have manually merged in a number of pending code amendments. Due to the age of the change requests, I would greatly appreciate it if you could install 1.2.5 from Github and let me know if the issues mentioned here are resolved. Many thanks!

@markhowellsmead
Copy link
Collaborator

Version 1.2.6 is now released.

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

No branches or pull requests

4 participants