{"id":93860,"date":"2018-11-12T15:42:55","date_gmt":"2018-11-12T15:42:55","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/woo-earn-sharing\/"},"modified":"2022-10-03T05:37:33","modified_gmt":"2022-10-03T05:37:33","slug":"woo-earn-sharing","status":"closed","type":"plugin","link":"https:\/\/si.wordpress.org\/plugins\/woo-earn-sharing\/","author":16575015,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"trunk","tested":"6.0.12","requires":"3.5","requires_php":"","requires_plugins":"","header_name":"Woo Earn Sharing","header_author":"Lucio Dev","header_description":"Let your users share their own codes to earn discounts.","assets_banners_color":"","last_updated":"2022-10-03 05:37:33","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/bit.ly\/wooes","header_plugin_uri":"https:\/\/lucio.dev\/Woo-Earn-Sharing","header_author_uri":"https:\/\/lucio.dev","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1155,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2793244,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2793244,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":1973091,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":1973091,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Woocommerce Menu","2":"Admin"}},"plugin_section":[],"plugin_tags":[369,31608,387,286],"plugin_category":[35,45],"plugin_contributors":[164212],"plugin_business_model":[],"class_list":["post-93860","plugin","type-plugin","status-closed","hentry","plugin_tags-affiliate","plugin_tags-friend-code","plugin_tags-referral","plugin_tags-woocommerce","plugin_category-advertising","plugin_category-ecommerce","plugin_contributors-lucius0101","plugin_committers-lucius0101"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/woo-earn-sharing.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/woo-earn-sharing\/assets\/screenshot-1.png?rev=1973091","caption":"Woocommerce Menu"},{"src":"https:\/\/ps.w.org\/woo-earn-sharing\/assets\/screenshot-2.png?rev=1973091","caption":"Admin"}],"raw_content":"<!--section=description-->\n<p>Let your users share their own codes to earn discounts!<\/p>\n\n<p>When someone uses a referral code when purchasing in your shop and the order is \"Completed\", the code owner will receive a percentage (set in the dashboard admin of WordPress), which will be added to their balance. The balance can then be used on the next purchase.<\/p>\n\n<p><em>See the FAQ for more details<\/em><\/p>\n\n<p><strong>Feature:<\/strong>\nYou can enable returning the money to a user who used their balance but had the purchase refunded, canceled, or failed.<\/p>\n\n<p><strong>Shortcodes!<\/strong>\n[wooes_user_balance] - Shows the current user balance\n[wooes_user_code] - Shows the current user code<\/p>\n\n<p><strong>Filters!<\/strong><\/p>\n\n<h4>wooes_user_balance<\/h4>\n\nFilters the user's balance\n\n<ul>\n<li>$balance float The user's balance.<\/li>\n<li>$user_id integer The user ID.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_get_user_code<\/h4>\n\nFilters the user's code\n\n<ul>\n<li>$code string The code fetched from the user.<\/li>\n<li>$user_id integer The user ID.<\/li>\n<li>$format boolean Whether or not the code should be formatted.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_get_user_by_code<\/h4>\n\nFilters the user by the code\n\n<ul>\n<li>$user \\WP_User|false The fetched user of false if none.<\/li>\n<li>$code string The code used to search the user.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_new_balance<\/h4>\n\nFilters the new user's balance\n\n<ul>\n<li>$new_balance float The new balance value.<\/li>\n<li>$money float The money being added.<\/li>\n<li>$old_balance float The previous value.<\/li>\n<li>$giving_back boolean Whether it's giving the money back or not.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_new_balance<\/h4>\n\nFilters the new user's balance\n\n<ul>\n<li>$new_balance float The new balance value.<\/li>\n<li>$money float The money being added.<\/li>\n<li>$old_balance float The previous value.<\/li>\n<li>$giving_back float Whether it's giving the money back or not.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_generate_new_referral_code<\/h4>\n\nFilters the newly generated code\n\n<ul>\n<li>$code string The randomly generated code.<\/li>\n<li>$length integer The length of the code, from settings.<\/li>\n<li>$alphanumeric boolean Whether it's an alphanumeric code, from settings.<\/li>\n<\/ul>\n\n<p><br \/><\/p>\n\n<h4>wooes_format_code<\/h4>\n\nFilters the formatted code\n\n<ul>\n<li>$code string The code.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>woo-earn-sharing<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Settings are in Woocommerce -&gt; Wooes<\/li>\n<li>If User Code Page returning not found, simply re-save Permalinks<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20is%20the%20balance%20used%3F'><h3>How is the balance used?<\/h3><\/dt>\n<dd><p>If a user makes a purchase that is less than their balance, i.e., their balance is greater than what they are trying to buy, the purchase amount will be 1, to avoid problems with payment methods when trying to finalize a purchase costing 0.00.<\/p>\n\n<p><em>Example:<\/em>\nUser Balance: USD 100.00\nUser Cart: USD 50.00\nDiscount based on balance: USD 49.00\nTotal purchase: USD 1.00<\/p>\n\n<p>And then, the user will have a USD 51.00 balance.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0<\/h4>\n\n<ul>\n<li>Many code improvements<\/li>\n<li>Race-condition prevention<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added Max Refund option<\/li>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"Let your users share their own codes to earn discounts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/93860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=93860"}],"author":[{"embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/lucius0101"}],"wp:attachment":[{"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=93860"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=93860"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=93860"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=93860"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=93860"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/si.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=93860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}