Inventory_Presser_Badges::add_hooks()

Adds hooks that power the feature.

On This Page


Return Return

(void)


Top ↑

Source Source

File: includes/class-badges.php

	public function add_hooks() {
		if ( ! class_exists( 'INVP' ) ) {
			return;
		}
		// If Carfax is enabled, add the badge to pages.
		$settings = INVP::settings();
		if ( isset( $settings['use_carfax'] ) && $settings['use_carfax'] ) {
			add_action( 'invp_archive_buttons', array( $this, 'add_carfax' ) );
			add_action( 'invp_single_buttons', array( $this, 'add_carfax' ) );
		}

		// NextGear vehicle inspections.
		add_action( 'invp_archive_buttons', array( $this, 'add_nextgear' ) );
		add_action( 'invp_single_buttons', array( $this, 'add_nextgear' ) );
	}