Tags: hyperlabco/AffiliateWP
Tags
Release/1.8 (#1264) * Add support for Jigoshop affiliate coupons * Set affiliate ID if pulled from coupon * First pass at simple registration options on user profile * Set email, rate, and earnings to empty string if empty. #1036 * Add else statement around finish(). #1085 * Include roles in step_forward() redirect. #1085 * Use get_users() instead of WP_Query_Query. Also use role__in instead of meta query. #1085 * Exchange: Use tabbed coupon interface for affiliate connection The old hook is maintained for older versions of Exchange. This introduces a new intermediary method `add_coupon_edit_hooks()`, because iThemes Exchange doesn't populate the version global until after the `plugins_loaded` hook fires. * No need to check if the affiliate rate is set when determining the rate type. #1132 * Add maxlength to creative text field * Add new parameters to [affiliate_login] shortcode Fixes #934 * New parameters for [affiliate_registration] shortcode Fixes #934 * Add option to add user as affiliate * Add username column to affiliates page * Change isset() to ! empty() * Tidy up * Add new email filters - affwp_notify_on_approval filter - affwp_notify_on_pending_affiliate_registration filter - affwp_notify_on_rejected_affiliate_registration filter * Option to disable application accepted email + only load when auto register option is disabled * rewrite update_discount_affiliate() * Add filterable helpers for retrieving the Affiliates Area page ID and URL – #1097 * Singular all-the-things. * Simplify logic for generating the affiliate area page URL. * Remove errant parenthesis in deashboard.php. * Add 'Dismiss Notice' links for both types of license notices. Also introduces context to the 'Dismiss Notice' strings to differentiate between integrations and license notice dismissals. Simplifies building the nonced-URLs as well. * Add logic for handling dismissal of license notices by setting a 2 week transient. * Add a mising DocBlock for . #1073 * Introduce a new action: 'affwp_update_affiliate', fired immediately before an affiliate record is updated. #1073 * Pick up hook parameter changes lost mid-commit. * Not just affiliate data. * Start off with a hash notation for Affiliate_WP_Referrals_DB::add(). #1062 * More docs for the 'affwp_insert_referral' hook and a return description for Affiliate_WP_Referrals_DB::add(). #1062 * Explicity cast amount back to a float after removing thousands separators. #999 * Adjust param order in 'affwp_update_affiliate' to be more logical with its sister hook. Introduce a sister hook 'affwp_updated_affiliate', which fires after the update and re-retrieves the affiliate object. #1073 * Fix an unrelated notice in affwp_format_ammount() triggered by an undefined var when ',' is the decimal separator. * Introduce a set() method for Affiliate_WP_Settings to facilitate easier testing. * Add a test for testing that a float stays afloat (heh) in affwp_format_amount(). * Simplify float test. * DocBlock fix for the set() method. * Reorganize base test files into subdirectories. * Rename files to remove now-moot prefixing. * Revert "Rename files to remove now-moot prefixing." This reverts commit b3301e8. * Implement the Affiliate_WP_Settings::set() method in various places. * Introduce a protected Affiliate_WP_Settings::save() that can optionally be triggered by a third parameter in the set() method. #1171 * Convert Affiliate_WP_Settings::set() to always accept an array of settings (for simplicity). #1171 * Some tests for Affiliates_WP_Settings::set() method. * Formatting and indentation for set() calls. * Remove debug cruft. * Use group 'functions' for misc-functions tests. * Add setUp() and tearDown() methods for misc-functions tests. * Add tests for affwp_get_currency() and affwp_get_decimal_count(). * Remove settings property and now-unnecessary setUp() method for misc-functions tests. * Add affiliate username (user_login) to search fields for Affiliates. * Supplement parameter documentation with a hash notation for Affiliate_WP_DB_Affiliates::get_affiliates(). #960 * Split WHERE LIKE clause conditions into separate pieces. #960 * Supplement parameter documentation with a hash notation for Affiliate_WP_DB_Affiliates::add(). #960 * Add tests for display_name and user_login searches for affiliates. #960 * Add a return description to the DocBlock for Affiliate_WP_DB_Affiliates::get_affiliates(). #960 * It would be good to also add the third user as an affiliate. #960 * Replace magic numbers used for cache expiration with self-documenting constants. #1178 * Standardize test-affiliates.php filename to test-affiliate-functions.php. * Add missing coverage DocBlocks to affiliate-functions tests. * Better classification for affiliate-functions tests. * Split tests for affwp_set_affiliate_status() to tests with fewer assertions. * Split affwp_get_affiliate() assertions out to multiple tests. * Initialize an affiliate test object on setUp(). * Try commenting out incomplete test flag. Not in my testing. * Split assertions for affwp_increase|decrease_visit_count() to multiple tests. * Improve affwp_increase_affiliate_vote_count() test. * Remove unused variables from two tests. Try to fix affwp_get_affiliate_area_page_url() from arbitrarily matching to prove the assertion. * Debug cruft. * Split out assertions for affwp_increase|decrease_affiliate_earnings() to separate tests. * Split out assertions for affwp_increase|decrease_affiliate_referral_count() into multiple tests. * Restore 'adjust' tests for referral count for now. * Split assertions for affwp_increase|decrease_affiliate_referral_count() to multiple tests. * Add a test for affwp_is_affiliate() with a real user ID. * Add a test for affwp_get_affiliate_id() with a real user ID. * Leverage _user_id for affwp_is_affiliate() test. * Separate tests from setup. * Actually register two users and add two affiliates for testing. * Add 2 tests for affwp_get_affiliate_username(). * Fix test for affwp_get_affiliate() when accepting an object. * Now that _user_id is a legit user ID, use that in the test for affwp_add_affiliate() to return false. * Add tests for affwp_is_active_affiliate(). * Add parameter and return docs for affwp_get_affiliate_user_id() and affwp_get_affiliate(). * Add tests for affwp_get_affiliate_user_id(). * Add a second test for testing invalid object passed to affwp_get_affiliate(). * Add and initialize affiliate object properties for simplified testing. * Add more tests for id vs object for affwp_get_affiliate_status(). * Simplify tests by accessing built affiliate objects where applicable. * Add todo for more affwp_get_affiliate_rate() tests. * Add test stubs for affwp_affiliate_has_custom_rate(). * Add test stubs for affwp_affiliate_has_custom_rate(). * Debug cruft in test-affiliate-db. * Add assertions to tests stubbed out for affwp_affiliate_has_custom_rate(). * Simplify an affwp_affiliate_has_custom_rate() test. * Add tests for affwp_get_affiliate_rate_type(). * Add a new rand_str property to use within closures. * Clarify a couple of test names. * Add a test for affwp_get_affiliate_rate_type() where a custom rate has been registered via the 'affwp_get_affiliate_rate_types' filter. * Prevent filter pollution in some other tests. * Add commented-out warning for 'affiliates_page_id' test that fails occasionally. * Add two tests for affwp_get_affiliate_rate_types(). * Add 8 tests for affwp_get_affiliate_email(). * Add two more tests for affwp_get_affiliate_email() for the empty account email case. * rand_str() takes a single int, not a range like rand(). * Add a helper + property to generate a random email address. * Add 7 tests for affwp_get_affiliate_payment_email(). * Use the new rand_email property throughout. * Add 6 tests for affwp_get_affiliate_login(). * Add 7 tests for affwp_delete_affiliate(). * Add 6 tests for affwp_get_affiliate_earnings(). * Add 5 tests for affwp_get_affiliate_unpaid_earnings(). * Relocate tests for increasing and decreasing affiliate earnings. * Stub out more tests for affwp_increase_affiliate_earnings(). * Add another test for affwp_decrease_affiliate_earnings(). * Relocate affiliate referral count tests, add two for failures. * Add an invalid affiliate_id test for affwp_increase_affiliate_referral_count(). * Add an invalid affiliate id test for affwp_decrease_affiliate_referral_count(). * Relocate tests for affwp_get_affiliate_visit_count(), affwp_increase_affiliate_visit_count(), and affwp_decrease_affiliate_visit_count(). * Add invalid affiliate id and object tests for affwp_get_affiliate_visit_count(). * Add invalid affiliate id test for affwp_increase_affiliate_visit_count(). * Add invalid affiliate id test for affwp_decrease_affiliate_visit_count(). * Relocate test for affwp_get_affiliate_conversion_rate(). * Add test for invalid affiliate id and object for affwp_get_affiliate_conversion_rate(). * Fix an invalid affiliate id test for affwp_get_affiliate_visit_count(). * Add note about testing for rounding in conversion rate. * Add invalid affiliate id and object tests for affwp_get_affiliate_campaigns(). * Relocate tests for affwp_add_affiliate() and affwp_update_affiliate(). * Stub more tests for affwp_get_affiliate_campaigns(). * Fine Travis. You can have your incomplete test. * Debug cruft. * Try skipping the scripting stuff to force Travis to run the suite. * Fix object context in a test. * Fix another object context fatal for Travis. * Change a line to try to trigger Travis, which is frozed. * Try to force object context in a misc-function test. * by reference perhaps. * OK. Let\'s try a straight callback. * Skip the floatval() test because of lexical variable errors in Travis. Ugh. * Fix typo in test for affwp_get_affiliate_rate_type(). * Add incomplete flag for a affwp_get_affiliate_area_page_id() test. * Filter in a highly unlikely match number for a affwp_get_affiliate_area_page_id() test. * Try to shore up affiliate area page test fragility. * Add additional condition tests for affwp_add_affiliate(). * Add a test for empty affiliate id for affwp_update_affiliate(). * Fix formatting for an affwp_update_affiliate() test. * Access modifier. * Add 5 tests for affwp_update_profile_settings(). * Supplement parameter docs for affwp_get_affiliate_referral_url() with a hash notation. [ci skip] * Add 7 tests for affwp_get_affiliate_base_url(). * Add todo for affwp_get_affiliate_referral_url() tests. [ci skip] * Keep and restore original settings to prevent memory pollution between tests. * Split active Tools tab logic out to a new helper, affwp_get_current_tools_tab(), reusable for adding a 4.4-compat notice. * Add tests for the new affwp_get_current_tools_tab() helper. * Update docs for affwp_migration_tab(). * Toggle the contents of the User Accounts section based on 4.4 compatibility. If the user has 'update_core' capabilities, show a link to update. * Switch logic for tool_is_compatible to not be reverse-yoda. * Use a highly unlikely match number for testing affiliates_page ID set in memory. * Avoid a fatal on activation by leveraging the affiliate_wp_install var as the base object instead of affiliate_wp(). See #1171, #1187. * Make affiliate status string translatable, tests * return if no $affiliate, correct phpdocs, filter * Add $affiliate clarification * Clarify filter in affwp_get_affiliate_status_label * Edit: 'genera' should be 'General' * Save 4 or 5 builds – only test multisite on WP latest. * Remove duplicate PHP 5.3 build * Accommodate affiliate user autocomplete UI for side-sortable metaboxes. #229 * Define below_php_version_notice as static method (#1211) * Define below_php_version_notice as static method Fixes #1201 * Notate static in the DocBlock for Affiliate_WP::below_php_version_notice(). * Access modifier for Affiliate_WP_Admin_Notices::dismiss_notices(). * Add a default case with an action hook to the switch statement in Affiliate_WP_Admin_Notices::dismiss_notices(). * Skip switching WC COD order referrals from 'pending' when marked 'processing' after checkout. * Prefix the 'dismiss_notices' action added in abe690b for #1182. See #1212. * Update store_discount_affiliate() * issue/955 – Show product results on shop page when accessed with a pretty referral URL (#1197) * Attempt to force WC to recognize the shop page even when accessed via a referral URL. * Strip pretty referral bits from pagination URLs on the shop page. * Switch to using preg_match to rebuild pagination URLs for pretty referrals. The previous code made an assumption that the pass affiliate ID was always real. This is a much more forward-compatible approach. * issue/1220 – Add the ability to query for specific affiliates by ID (one or many). (#1221) * Add the ability to query for specific affiliates by ID (one or many) in `->get_affiliates()` * Adds a new 'affiliate_id' argument to `Affiliate_WP_DB_Affiliates::get_affiliates()` that accepts either a single affiliate ID or an array, just like the 'user_id' argument. * Adds unit tests for the `get_affiliates()` logic around querying for both specific users and specific affiliates. See #1220. * Remove some unneeded tests logic. * issue/893 – Improve the UX of deleting affiliates (#1218) * Rework affiliate deletion messages output for single and plural contexts: * Single affiliate being deleted (not current user) - Show a singular-context string, show the user deletion checkbox * Single affiliate being deleted (current user) - Show a singular-context string, hide the user deletion checkbox * Multiple affiliates being deleted (not including current user) - Show a plural-context string, show the user deletion checkbox * Multiple affiliates being deleted (including current user) - Show a plural-context string, show the user deletion checkbox with a note about how the current user won't be deleted. See #893. * Add single vs plural context strings for the 'You have specified ...' affiliate deletion string. * Correctly retrieve affiliate objects to compare against. * Update the logic for grabbing affiliates to delete by ID following #1220 being merged. * Update the delete button label to be number-agnostic with 'Confirm Deletion'. * Rename 'affwp_update_affiliate' action to 'affwp_pre_update_affiliate' to prevent a fatal. * issue/1231 - wrap contexts properly #1231 * issue/933 – Affiliate Dashboard: Make vist URLs human friendly (#1217) * Affiliate Dashboard: Make vist urls human friendly URLs are now shortened to remove unnecessary information, like the host or non public query vars. The url is now a link as well. Introduces `affwp_make_url_human_readable()`. * Move tests to the already-existing Misc_Functions_Tests class. * In the unlikely event that parse_url() returns false, return the and bail. * Add a table summary for the benefit of screenreaders. #933 * Add an aria label to the 'Converted' column for the visits table. #933 * Inline docs improvements. * Adjust the table summary based the referrer not always being a URL. * Whoops. Removed the 'relative format' part about column one. * issue/985 – Mark $0.00 referrals in Formidable Pro as 'Unpaid' (#1242) * Clear deprecated method notices. * Debug cruft. * Mark free referrals as unpaid. #985. * Define context outside of the first condition to avoid a notice. (#1248) * issue/498 – Add membership-level commissions for Paid Memberships Pro (#1226) * Adjust function calculate_referral_amount() to accept an optional product type (such as 'membership'). * First run PMP membership-level referral rates logic + settings. * Good to actually check the nonce value on save. Derp. * Spacing. * Add parameter and return descriptions to the DocBlock for calculate_referral_amount(). * Clarify the 'enabled' logic for membership-level referrals. * Add a DocBlock for the 'affwp_get_product_rate' filter. * Changelog entry for product_type parameter in calculate_referral_amount(). * Missing commas. * Helpful to use the correct property name. * Add contextual help to the referral rate setting. * Remove unused value in contextual help text printf. * Remove 'product_type' logic, instead passing the membersip_level as the product ID to trigger get_product_rate(). * Reset product_id to 0 before returning via the filter. * Restore verbatim logic for get_product_rate(). * Remove product_type cruft. * Correct description for reference param. * Return early if referrals are disabled for membership level in PMP. #498 * issue/1224 – Fix sorting for the Name, Username, Unpaid and Paid Referrals columns for Affiliates (#1230) * Add orderby logic for statuses in get_affiliates(). * Docs updates. * Clean up whitelisting logic for orderby. * BUG FIX: Fix ordering by display_name. * Add tests for all possible orderby permutations. * Clarify orderby logic inline comments. * For ease of extension, use a switch for possible orderby values. * Remove duplicated whitelist logic. * More logical ordering of orderby cases. * Add logic to orderby visits count. * Inline comments. * Add logic to handle ordering by username. * Bravo. * Add tests for username and visits orderby values. * Remove the visits case because it is already supported as a default column. * Remove duplicate logic for determining the orderby value for name and username. * Move LEFT JOIN logic to the orderby switch. Default empty. * Oh hey, we can remove a now-duplicate query. WIN. * When Credit Last Referrer is enabled, only track visit if the affiliate is different than the already tracked affiliate. #1002 (#1205) * issue/1243 - Allow tabs to be removed (#1249) * Allow tabs to be removed #1243 * rename function * remove $affiliates_page_id * Use affwp_set_referral_status in reject_referral (#1253) replaces inline referral status adjustment within Affiliate_WP_Base::reject_referral in favor of affwp_set_referral_status. *See #1245 *Originally committed against master at 30f407d * issue/903 – Switch to core-bundled autocomplete for searching affiliates (#1250) * issue/433 – Display an affiliate's name and registration date on the affilite-editing screen * Updated language files for 1.8 * Fixed text domain * Updated language files after fixed text domain * Compress scripts and styles * Compiled mo files * Set version number to 1.8 * Version bump to 1.8 for package.json
PreviousNext