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( 'shop_as_client_default_create_user', function( $option ) { | |
return 'yes'; | |
}); |
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 // don't copy this line to your functions.php file | |
/** | |
* Use a different role during LifterLMS user registrations | |
* @param array $data assoc. array of data to be used to create the new user | |
* @return array | |
*/ | |
function my_modify_default_user_role( $data ) { | |
$data['role'] = 'subscriber'; | |
return $data; |
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 // don't copy to your functions.php file | |
/** | |
* Restores pre 3.18.0 popover functionality for access plans with any membership restrictions | |
* Prior to 3.18.0 any # of access plans caused a popover on click | |
* since 3.18.0 if there's only one access plan users are directed to the membership page only when there's more than 1 membership restriction | |
* @param string $url default access plan checkout url | |
* @param obj $plan instance of the LLMS_Access_Plan model | |
* @return string | |
*/ | |
function my_llms_plan_get_checkout_url( $url, $plan ) { |
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 // dont copy this to your functions.php | |
/** | |
* Add "author" support to LifterLMS Course post type | |
*/ | |
function my_custom_course_support( $args ) { | |
$args['supports'][] = 'author'; | |
return $args; | |
} | |
add_filter( 'lifterlms_register_post_type_course', 'my_custom_course_support' ); |
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 | |
/** | |
* Output a custom message before / after LLMS reviews | |
*/ | |
function my_custom_reviews_message() { | |
?> | |
<!-- put custom html below this line --> |
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
remove_action('woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 30); | |
add_action('woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 15 ); |
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: Alyssa Gets to Change Her Text | |
* Plugin URI: https://bradgriffin.me | |
* Description: Engage Maverick | ENGAGE! Make a conversation with your customer and customize EVERY piece of Text! | |
* Version: 1 | |
* Author: Brad | |
* Author URI: https://bradgriffin.me | |
* Requires at least: 4.6 | |
* Tested up to: 4.6 |
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 /* <--------Careful! */ | |
/** | |
* Plugin Name: Per product Redirect | |
* Description: Empowers WooCommerce Store owners to add a custom redirect page on add-to-cart for EVERY product | |
* Version: 1.0.0 | |
* Author: Brad Griffin | |
* Author URI: https://woocamp.com | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
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
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 // Do not include this if already open! | |
/** | |
* Remove existing tabs from single product pages. | |
*/ | |
function remove_woocommerce_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); | |
unset( $tabs['reviews'] ); | |
unset( $tabs['additional_information'] ); | |
return $tabs; |
NewerOlder