Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
ajax-search-for-woocommerce
/
includes
/
Integrations
/
Themes
/
Woodmart
:
Woodmart.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace DgoraWcas\Integrations\Themes\Woodmart; use DgoraWcas\Abstracts\ThemeIntegration; // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } class Woodmart extends ThemeIntegration { public function extraFunctions() { add_filter( 'woodmart_shop_page_link', array( $this, 'shop_page_link' ), 10, 3 ); } /** * Add to the address of the shop a parameter informing that the search is done by our plugin * * @param string $link * @param boolean $keep_query * @param string $taxonomy * * @return string */ public function shop_page_link( $link, $keep_query, $taxonomy ) { if ( $keep_query && isset( $_GET['dgwt_wcas'] ) ) { $link = add_query_arg( 'dgwt_wcas', '1', $link ); } return $link; } }