ProductGalleryLargeImageNextPrevious::get_button()protectedWC 1.0

Generates the HTML for a next or previous button for the product gallery large image.

Method of the class: ProductGalleryLargeImageNextPrevious{}

No Hooks.


String. The HTML for the generated button.


// protected - for code of main (parent) or child class
$result = $this->get_button( $button_type, $context );
$button_type(string) (required)
The type of button to generate. Either 'previous' or 'next'.
$context(string) (required)
The block context.

ProductGalleryLargeImageNextPrevious::get_button() code WC 9.0.1

protected function get_button( $button_type, $context ) {
	if ( 'insideTheImage' === $context['nextPreviousButtonsPosition'] ) {
		return $this->get_inside_button( $button_type, $context );

	return $this->get_outside_button( $button_type, $context );