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
{ | |
"product_id": 2, | |
"title": "Product Title", | |
"url": "https://company.uamplified.io/product-slug/", | |
"slug": "product-slug", | |
"logo": "", | |
"version": "1.0", | |
"visibility": "public", | |
"created_date": 1533565994, | |
"total_members": 3, |
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
/** | |
* Render Shortcodes in Notifications | |
* @version 1.0 | |
*/ | |
function mycred_pro_render_shortcodes_in_notice( $notice ) { | |
return do_shortcode( $notice ); | |
} | |
add_filter( 'mycred_notifications_note', 'mycred_pro_render_shortcodes_in_notice' ); |
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
/** | |
* Adjust WP ULike Reference | |
* When getting points for liking a content, change the reference | |
* to identify the post type so we can create badges for each post type | |
* that gets liked instead of just one for all likes. | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_run_this', 'mycred_wpulike_per_cpt', 10, 3 ); | |
function mycred_wpulike_per_cpt( $run_this, $mycred ) { |
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
/** | |
* Register Custom Hook | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_setup_hooks', 'mycred_pro_register_view_content_category_hook' ); | |
function mycred_pro_register_view_content_category_hook( $installed ) { | |
$installed['view_category_content'] = array( | |
'title' => __( '%plural% for Viewing Content (Categories)', 'mycred' ), |
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
/** | |
* Register Custom Hook | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_setup_hooks', 'mycred_pro_register_publish_content_category_hook' ); | |
function mycred_pro_register_publish_content_category_hook( $installed ) { | |
$installed['publish_category_content'] = array( | |
'title' => __( '%plural% for Publishing Content (Categories)', 'mycred' ), |
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
/** | |
* Register Custom Hook | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_setup_hooks', 'mycred_pro_register_publish_content_category_hook' ); | |
function mycred_pro_register_publish_content_category_hook( $installed ) { | |
$installed['publish_category_content'] = array( | |
'title' => __( '%plural% for Publishing Content (Categories)', 'mycred' ), |
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
/** | |
* Adjust Publish Reference | |
* Log the event under a unique reference based on the post type being published. | |
* @version 1.0 | |
*/ | |
function mycred_pro_publish_ref_by_type( $reference, $post ) { | |
return 'publish_' . $post->post_type; | |
} |
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
/** | |
* Reward Completed Orders | |
* Will give a user 1 point for each product in an order. | |
* @version 1.0.1 | |
*/ | |
function mycred_pro_reward_completed_orders( $order_id ) { | |
if ( ! function_exists( 'mycred' ) ) return; | |
$order = wc_get_order( $order_id ); |
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( 'mycred_woo_reward_mycred_payment', '__return_true' ); |
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
class My_Custom_My_Account_Endpoint { | |
/** | |
* Custom endpoint name. | |
* | |
* @var string | |
*/ | |
public static $endpoint = 'my-custom-endpoint'; | |
/** |
NewerOlder