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 | |
/** | |
* Removes the restricted content display from the account page | |
* | |
* Don't forget that you are now responsible to show the restricted content to your users somewhere else | |
*/ | |
function remove_from_account_page(){ | |
remove_action( 'woocommerce_before_my_account', array( $GLOBALS['wecr_show_content'], 'show_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 | |
class CT_Config_Ajax{ | |
function __construct(){ | |
add_action( 'wp_ajax_ct_get_sku', array( $this, 'get_sku' ) ); | |
add_action( 'wp_ajax_nopriv_ct_get_sku', array( $this, 'get_sku' ) ); | |
} // __construct | |
public function get_sku(){ |
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 | |
/** | |
* Allows you to change the default message for simple products. | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
* @return string Your custom message | |
*/ | |
function change_simple_product_message( $message, $product_id ) { | |
return 'Our custom message'; |
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 | |
/** | |
* Allows you to change the default message for grouped products. | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
* @return string Your custom message | |
*/ | |
function change_grouped_product_message( $message, $product_id ) { | |
return 'Our custom message'; |
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 | |
/** | |
* Allows you to change the default message for variable products. | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
* @return string Your custom message | |
*/ | |
function change_variable_product_message( $message, $product_id ) { | |
return 'Our custom message'; |
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 | |
/** | |
* Overrides the default message for subscription type products | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @param int $product_id The post_id for the product the message would be tied to | |
* @return string Your custom message | |
*/ | |
function change_subscription_message( $message, $product_id ) { | |
return 'Our custom message'; |
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 | |
/** | |
* Registers and enqueues scripts and styles | |
* | |
* @uses wp_enqueue_style | |
* @uses wp_enqueue_script | |
* | |
* @since 1.0 | |
* @author SFNdesign, Curtis McHale | |
*/ |
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 | |
/** | |
* Abstracting the featured Ads Query so that we don't have to retype it all over | |
* | |
* @class WP_Query | |
* @uses wp_parse_args | |
* | |
* @since 1.0 | |
* @author SFNdesign, Curtis McHale | |
*/ |
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 | |
/** | |
* Allows you to override any custom message or the default message for users | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @param int $product_ids The post_id array for the product the message would be tied to | |
* @return string Your custom message | |
*/ | |
function change_global_message( $message, $product_ids ) { | |
return 'Our custom message'; |
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 | |
/** | |
* Allows you to filter the stock bbPress message that reads 'You must be logged in to create new topics.' | |
* | |
* @param string $message stock Easy Content Restriction message | |
* @return string Your custom message | |
*/ | |
function change_logged_in_topic_message( $message ) { | |
return 'Our custom message'; | |
} |