This file contains hidden or 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( 'jck_sfr_votes_limit', 'jck_sfr_votes_limit', 10, 2 ); | |
/** | |
* Limit votes by role. | |
* | |
* @param int $limit | |
* @param JCK_SFR_User $user_votes | |
* | |
* @return int | |
*/ |
This file contains hidden or 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 low stock badge. | |
*/ | |
function iconic_add_low_stock_badge() { | |
global $product; | |
$manage_stock = $product->get_manage_stock(); | |
$stock = $product->get_stock_quantity(); |
This file contains hidden or 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 a redirect field to the form. | |
*/ | |
function iconic_add_to_cart_redirect_field() { | |
if ( ! is_archive() ) { | |
return; | |
} | |
This file contains hidden or 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 $number param to woocommerce-subscriptions. | |
* | |
* @param int (optional) An interval in the range 1-6 | |
* @param string (optional) One of day, week, month or year. If empty, all subscription ranges are returned. | |
* @since 2.0 | |
*/ | |
function wcs_get_subscription_period_strings( $number = 1, $period = '' ) { |
This file contains hidden or 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 | |
/** | |
* Change price format from range to "From:" | |
* | |
* @param float $price | |
* @param object $product | |
* | |
* @return string | |
*/ |
This file contains hidden or 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 | |
/** | |
* Change variation price to parent. | |
* | |
* Implement this: https://iconicwp.com/blog/change-price-range-variable-products-woocommerce/ | |
* When using this plugin: https://iconicwp.com/products/woocommerce-show-single-variations/ | |
* | |
* @param float $price | |
* @param obj $product |