<?php
/**
 * Author: Rymera Web Co.
 *
 * @package SAAI\Integrations
 */

namespace SAAI\Integrations;

use SAAI\Abstracts\Abstract_Class;

/**
 * WC class.
 *
 * @since 1.0.0
 */
class WC extends Abstract_Class {

    /**
     * Enqueue scripts and styles for the front end.
     *
     * @since 1.0.0
     * @return void
     */
    public function wp_enqueue_scripts() {

        if ( is_singular( 'product' ) ) {
            wp_register_style(
                'storeagent-fonts',
                plugins_url( 'static/fonts/fonts.css', SAAI_PLUGIN_FILE ),
                array(),
                filemtime( SAAI_PLUGIN_DIR_PATH . 'static/fonts/fonts.css' )
            );
        }
    }

    /**
     * Run the integration.
     *
     * @since 1.0.0
     * @return void
     */
    public function run() {

        add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 5 );
    }
}
