View uamplified-api-product-object
{ | |
"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, |
View mycred-notifications-note-filter-example
/** | |
* 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' ); |
View mycred-wpulike-per-type
/** | |
* 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 ) { |
View mycred-view-content-category-hook
/** | |
* 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' ), |
View mycred-publish-content-cat-hook
/** | |
* 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' ), |
View points-for-publishing-content-hook-example
/** | |
* 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' ), |
View mycred-publish-hook-ref-filter-example1
/** | |
* 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; | |
} |
View reward-completed-woo-orders
/** | |
* 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 ); |
View reward-mycred-payment
add_filter( 'mycred_woo_reward_mycred_payment', '__return_true' ); |
View mycred-history-woo-my-account
class My_Custom_My_Account_Endpoint { | |
/** | |
* Custom endpoint name. | |
* | |
* @var string | |
*/ | |
public static $endpoint = 'my-custom-endpoint'; | |
/** |
NewerOlder