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

Fatal error for use limit_options() in Set #1011

Closed
Grafs opened this issue May 31, 2021 · 2 comments
Closed

Fatal error for use limit_options() in Set #1011

Grafs opened this issue May 31, 2021 · 2 comments

Comments

@Grafs
Copy link

Grafs commented May 31, 2021

Version

  • Carbon Fields: 3.3
  • WordPress: 5.7.2
  • PHP: 8

Expected Behavior

limit_options( $count ) for Field::make( 'set', 'crb_product_features', 'Features' )

Actual Behavior

Fatal error: Uncaught Error: Call to undefined method Carbon_Fields\Field\Set_Field::limit_options()

Container definition

Container::make( 'post_meta', __('Options blocks') )
			->where( 'post_id', '=', '57241')
				->add_fields( array(
					Field::make( 'set', 'regions_reg', __('Region') )
				        ->limit_options( 3 )
						-> add_options( array(
							'global' => __('Global'),
							'eu' => __('EU'),
							'austria' => __('Austria'),
							'belgium' => __('Belgium'),
							'czech republic' => __('Czech Republic'),
							'denmark' => __('Denmark'),
						) )
		 ) );
@HTMLBurger-NG
Copy link
Contributor

Hi @Grafs ,

We're going to address this in a future release.

@HTMLBurger-NG
Copy link
Contributor

Just to clarify: this has been fixed in development branch.

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

2 participants