This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Divi sidebar from all WooCommerce Product pages (as well as Shop and Category pages) | |
*/ | |
function mytheme_divi_output_content_wrapper_end() { | |
echo ' | |
</div> <!-- #left-area --> | |
</div> <!-- #content-area --> | |
</div> <!-- .container --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "menu-id-to-replace" ) { | |
if ( apply_filters( 'litespeed_esi_status', false ) ) | |
return apply_filters( 'litespeed_esi_url', 'my-esi-menu', 'Navigation Menu', array( 'nav_menu_html' => $nav_menu_html, 'args' => $args ), $control = 'private,no-vary', $silence = false ); | |
} | |
return $nav_menu_html; | |
}, 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "ast-hf-menu-2" ) { | |
if ( apply_filters( 'litespeed_esi_status', false ) ) | |
return apply_filters( 'litespeed_esi_url', 'astra_secondary_menu', 'Secondary Menu', array( 'nav_menu_html' => $nav_menu_html, 'args' => $args ), $control = 'private,no-vary', $silence = false ); | |
} | |
return $nav_menu_html; | |
}, 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wc_square_digital_wallet_js_args', function ( $args ) { | |
if ( isset( WC()->cart ) && class_exists( 'WC_Smart_Coupons' ) ) { | |
$sc = WC_Smart_Coupons::get_instance(); | |
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { | |
$product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); | |
$coupon_titles = $sc->get_coupon_titles( array( 'product_object' => $product ) ); | |
if ( $coupon_titles ) { | |
$args['payment_request'] = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Subscription payment failed. | |
* | |
* 'payload' => array ( | |
* 'name' => '', // Subscription name | |
* 'amount' => 00.00, // Subscription price | |
* 'status' => 'suspended', // Subscription status | |
* 'profile' => array ( | |
* 'customerProfileId' => 123, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Custom Divi Row Order .mobile_col_2_1 */ | |
@media all and (max-width: 980px) { | |
.mobile_col_2_1 { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.mobile_col_2_1 .et_pb_column_1, | |
.mobile_col_2_1 .et_pb_column_1_2 { | |
order: 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Divi sidebar from all WooCommerce Product pages | |
*/ | |
function mytheme_divi_output_content_wrapper_end() { | |
echo ' | |
</div> <!-- #left-area --> | |
</div> <!-- #content-area --> | |
</div> <!-- .container --> | |
</div> <!-- #main-content -->'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_head', 'yith_divi_color_picker_compatibility'); | |
function yith_divi_color_picker_compatibility() { | |
echo ' | |
<style> | |
.yith-plugin-ui .wp-picker-container a.wp-color-result { | |
width: 30px; | |
height: 30px; | |
box-shadow: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Third Party integration with User Switching plugin. | |
* | |
* @since 2.9.9.2 | |
* @package LiteSpeed_Cache | |
* @subpackage LiteSpeed_Cache/thirdparty | |
* @author LiteSpeed Technologies <info@litespeedtech.com> | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function() { | |
if ( method_exists( 'LiteSpeed_Cache_API', 'esi_enabled' ) && LiteSpeed_Cache_API::esi_enabled() ) { | |
LiteSpeed_Cache_API::hook_tpl_not_esi( function () { | |
add_filter( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "menu-id-to-replace" ) { | |
return LiteSpeed_Cache_API::esi_url( 'my_custom_menu_esi_hook', 'My Menu to Use with ESI' ); | |
} | |
return $nav_menu_html; |
NewerOlder