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

Warning and no button using shortcode #27

Closed
silentFred opened this issue Sep 29, 2019 · 8 comments
Closed

Warning and no button using shortcode #27

silentFred opened this issue Sep 29, 2019 · 8 comments
Assignees
Labels

Comments

@silentFred
Copy link

silentFred commented Sep 29, 2019

Describe the bug
Warning shown when trying to use any shortcodes:

Warning: in_array() expects parameter 2 to be array, boolean given in 
public_html/wp-content/plugins/woocommerce-quick-buy/includes/shortcodes/class-button.php on line 50
@welcome
Copy link

welcome bot commented Sep 29, 2019

Thanks for opening your first issue here! Be sure to follow the issue template!

@varunsridharan
Copy link
Owner

Hi There

Can you tell me if you have configured the settings for this plugin ?

@silentFred
Copy link
Author

silentFred commented Sep 30, 2019 via email

@rafwlaz
Copy link

rafwlaz commented Oct 30, 2019

@varunsridharan I found what is the problem with shortcode, in class-link.php there is an error with key which is getting options:

$quick_buy_link_product_types = Helper::option( 'quick_buy_link_product_types', array( 'simple' ) );

should be:

$quick_buy_link_product_types = Helper::option( 'enabled_product_types', array( 'simple' ) );

@varunsridharan
Copy link
Owner

hi there sorry about that. i will fix it in my next update

@stivenmart
Copy link

@varunsridharan Please update the base code plugin, i had the same problem of @rafwlaz their fix works perfectly.

@varunsridharan
Copy link
Owner

@stivenmart @rafwlaz thats not the proper fix. you need to update your settings page once after plugin is installed. please do check our settings page. we already have an EXPERIMENTAL feature for which we set the field's id as quick_buy_link_product_types which should not be changed.

@swalkergibson
Copy link

@varunsridharan The fix @rafwlaz found does appear to be the right one. If you leave the experimental feature unset, the enabled_product_types array will never be passed through to the link generator method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants