GRAYBYTE WORDPRESS FILE MANAGER8114

Server IP : 162.213.255.40 / Your IP : 216.73.216.121
System : Linux server146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/home/hellrfbn/public_html/wp-content/plugins/jetpack/3rd-party/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/plugins/jetpack/3rd-party//woocommerce.php
<?php
/**
 * This file contains compatibility functions for WooCommerce to improve Jetpack feature support.
 *
 * @package automattic/jetpack
 */

add_action( 'woocommerce_init', 'jetpack_woocommerce_integration' );

/**
 * Loads JP+WC integration.
 *
 * Fires on `woocommerce_init` hook
 */
function jetpack_woocommerce_integration() {
	/**
	 * Double check WooCommerce exists - unlikely to fail due to the hook being used but better safe than sorry.
	 */
	if ( ! class_exists( 'WooCommerce' ) ) {
		return;
	}

	add_action( 'woocommerce_share', 'jetpack_woocommerce_social_share_icons', 10 );

	/**
	 * Add product post type to Jetpack sitemap while skipping hidden products.
	 */
	add_filter( 'jetpack_sitemap_post_types', 'jetpack_woocommerce_add_to_sitemap' );
	add_filter( 'jetpack_sitemap_skip_post', 'jetpack_woocommerce_skip_hidden_products_in_sitemap', 10, 2 );

	/**
	 * Wrap in function exists check since this requires WooCommerce 3.3+.
	 */
	if ( function_exists( 'wc_get_default_products_per_row' ) ) {
		add_filter( 'infinite_scroll_render_callbacks', 'jetpack_woocommerce_infinite_scroll_render_callback', 10 );
		add_action( 'wp_enqueue_scripts', 'jetpack_woocommerce_infinite_scroll_style', 10 );
	}
}

/**
 * Add product post type to sitemap if Woocommerce is present.
 *
 * @param array $post_types Array of post types included in sitemap.
 */
function jetpack_woocommerce_add_to_sitemap( $post_types ) {
	$post_types[] = 'product';

	return $post_types;
}

/**
 * Skip hidden products when generating the sitemap.
 *
 * @param bool    $skip Whether to skip the post.
 * @param WP_Post $post The post object.
 */
function jetpack_woocommerce_skip_hidden_products_in_sitemap( $skip, $post ) {
	if ( $post !== null && $post->post_type === 'product' ) {
		$product = wc_get_product( $post->ID );
		if ( $product ) {
			$skip = ! $product->is_visible();
		}
	}
	return $skip;
}

/**
 * Make sure the social sharing icons show up under the product's short description
 */
function jetpack_woocommerce_social_share_icons() {
	if ( function_exists( 'sharing_display' ) ) {
		remove_filter( 'the_content', 'sharing_display', 19 );
		remove_filter( 'the_excerpt', 'sharing_display', 19 );
		sharing_display( '', true );
	}
}

/**
 * Remove sharing display from account, cart, and checkout pages in WooCommerce.
 */
function jetpack_woocommerce_remove_share() {
	/**
	 * Double check WooCommerce exists - unlikely to fail due to the hook being used but better safe than sorry.
	 */
	if ( ! class_exists( 'WooCommerce' ) ) {
		return;
	}

	if ( is_cart() || is_checkout() || is_account_page() ) {
		remove_filter( 'the_content', 'sharing_display', 19 );
		if ( class_exists( 'Jetpack_Likes' ) ) {
			remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30 );
		}
	}
}
add_action( 'loop_start', 'jetpack_woocommerce_remove_share' );

/**
 * Add a callback for WooCommerce product rendering in infinite scroll.
 *
 * @param array $callbacks Array of render callpacks for IS.
 * @return array
 */
function jetpack_woocommerce_infinite_scroll_render_callback( $callbacks ) {
	$callbacks[] = 'jetpack_woocommerce_infinite_scroll_render';
	return $callbacks;
}

/**
 * Add a default renderer for WooCommerce products within infinite scroll.
 */
function jetpack_woocommerce_infinite_scroll_render() {
	if ( ! is_shop() && ! is_product_taxonomy() && ! is_product_category() && ! is_product_tag() ) {
		return;
	}

	woocommerce_product_loop_start();

	while ( have_posts() ) {
		the_post();
		wc_get_template_part( 'content', 'product' );
	}

	woocommerce_product_loop_end();
}

/**
 * Basic styling when infinite scroll is active only.
 */
function jetpack_woocommerce_infinite_scroll_style() {
	$custom_css = '
	.infinite-scroll .woocommerce-pagination {
		display: none;
	}';
	wp_add_inline_style( 'woocommerce-layout', $custom_css );
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
debug-bar
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
3rd-party.php
2.853 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
amp.php
0.728 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
atomic.php
0.999 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
bbpress.php
2.034 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
beaverbuilder.php
0.466 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
bitly.php
0.959 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
buddypress.php
0.491 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class-domain-mapping.php
4.121 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class-jetpack-bbpress-rest-api.php
4.391 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class.jetpack-amp-support.php
15.971 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
creative-mail.php
3.256 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
debug-bar.php
0.716 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
jetpack-backup.php
2.752 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
jetpack-boost.php
2.802 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
qtranslate-x.php
0.619 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
vaultpress.php
2.115 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
web-stories.php
0.956 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
woocommerce-services.php
3.45 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
woocommerce.php
3.774 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
wpcom-reader.php
1.743 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
wpml.php
1.595 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF