post_content, 'affiliate_order_details' ) ) { $ret = true; } return $ret; } /** * Shortcode: [affiliate_order_details]. * * @since 1.0 * * @param array $atts Shortcode attributes. * @param string $content Optional. Shortcode content. Default null. * @return string Shortcode output. */ public function affiliate_order_details( $atts, $content = null ) { global $affwp_od_atts; if ( ! ( affwp_is_affiliate() && affwp_is_active_affiliate() ) ) { return; } if ( ! ( affiliatewp_order_details_for_affiliates()->can_access_order_details() || affiliatewp_order_details_for_affiliates()->global_order_details_access() ) ) { return; } $affwp_od_atts = shortcode_atts( array( 'number' => '', 'affiliate_id' => '', 'status' => '', ), $atts, 'affiliate_order_details' ); ob_start(); affiliate_wp()->templates->get_template_part( 'dashboard-tab', 'order-details' ); // Return the rendered table as-is. Re-parsing it as shortcode input would execute any // shortcode a shopper planted in an order field inside the credited affiliate's dashboard. return ob_get_clean(); } } new AffiliateWP_Order_Details_For_Affiliates_Shortcodes();