Created
November 17, 2021 11:08
-
-
Save somewherewarm-snippets/7abab2bb1ef9150a48eaffed1a46a67f to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Plugin Name: All Products for WooCommerce Subscriptions - Hide Subscription plans for specific user roles. | |
* Plugin URI: https://woocommerce.com/products/all-products-for-woocommerce-subscriptions/ | |
* Description: Use this snippet to hide the subscription price from subscription plans | |
* Version: 1.0 | |
* Author: WooCommerce | |
* Author URI: https://woocommerce.com/ | |
* Developer: Jason Kytros | |
* | |
* | |
* Copyright: © 2021 Jason Kytros. | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
add_filter( 'wcsatt_single_product_subscription_dropdown_option_price_html_args', 'sw_apfs_show_option_discount', 10, 4 ); | |
function sw_apfs_show_option_discount( $args, $scheme, $product, $parent_product ) { | |
if ( 'dropdown' === $args[ 'context' ] ) { | |
$args[ 'hide_price' ] = true; | |
} | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment