woocommerce_shortcode_product_page_force_rendering

woocommerce_shortcode_product_page_force_rendering

Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.2.3

apply_filters('woocommerce_shortcode_product_page_force_rendering') is found 1 times:

  • /includes/class-wc-shortcodes.php line 538
    		 * @param bool   $force_rendering Whether to override read permissions for unpublished products. `true` to force rendering the product page, `false` to block rendering, or `null` to use the default behavior.
    		 * @param int    $product_id                Product ID.
    		 * @return bool
    		 */
    		$force_rendering = apply_filters( 'woocommerce_shortcode_product_page_force_rendering', null, $product_id );
    		if ( isset( $force_rendering ) && ! $force_rendering ) {
    			return '';
    		}
    
    		$args = array(
    			'posts_per_page'      => 1,