Skip to content

Instantly share code, notes, and snippets.

@cdils

cdils/affiliate.php Secret

Last active Nov 18, 2016
Embed
What would you like to do?
<?php
if ( ! like == $product && ! function_exists( 'affiliate_program' ) {
return;
}
if ( true == $affiliate ) {
use_affiliate_link();
get_filthy_rich();
return;
}
@kravco

This comment has been minimized.

Copy link

@kravco kravco commented Nov 18, 2016

Hey.

I found your article about Wordpress deployment workflow and I followed to affiliate disclosure information. I cannot agree more with what you state there, but there is a thing, your code-like description of what you are doing is little flawed :)

Basicly it says, that you would use any affiliate program, whether you like the product or not.

Lines 3--5 in common english: If i don't like the product AND it does not have an affiliate program then get out.

It means you get out only if both assumptions are fulfilled, therefore any existing affiliate program means, you would not get out.

The key is the AND that should be OR to match the article. De Morgan's Laws got you and you are definitely not the first or the last one :)

Have a nice day and get rich!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.