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 | |
function my_upsell_popup_scripts_enqueue () { | |
if ( is_page( 13 ) ) { //CHANGE 13 TO THE ID OF YOUR PAGE! | |
wp_enqueue_script( 'thp-flickity-js', get_site_url().'/wp-content/plugins/woocommerce-upsell-popup-pro/js/flickity.pkgd.min.js', array('jquery'), '', false ); | |
wp_enqueue_style( 'thp-flickity-style', get_site_url().'/wp-content/plugins/woocommerce-upsell-popup-pro/css/flickity.min.css' ); | |
wp_enqueue_style( 'thp-flickity-style-fix', get_site_url().'/wp-content/plugins/woocommerce-upsell-popup-pro/css/fix.min.css' ); | |
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 | |
/* | |
Template Name: My Awesome Template | |
Uses Slider: No | |
*/ |
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 | |
/* | |
URL: https://wproot.dev/blog/woocommerce-display-all-products-eligible-for-coupons/ | |
*/ | |
$args = array( | |
'posts_per_page' => -1, //show all posts | |
'post_type' => 'shop_coupon', //custom post type | |
'post_status' => 'publish', //published coupons only | |
); |
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 | |
/* | |
URL: https://wproot.dev/blog/get-woocommerce-current-product-category-single-product-page/ | |
*/ | |
if ( has_term( 'tshirts', 'product_cat' ) ) //product category is tshirts | |
{ | |
$flatrate = '10.00'; | |
} | |
elseif ( has_term( 'hoodies', 'product_cat' ) ) //product category is hoodies |
NewerOlder