This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
start:website:source [2016/10/12 10:47] andre [Add ship to store option for dealers with less-than-minimum fee] |
start:website:source [2016/10/12 10:52] (current) andre [Add ship to store option for dealers with less-than-minimum fee] |
||
---|---|---|---|
Line 22: | Line 22: | ||
<code> | <code> | ||
/** | /** | ||
- | * @snippet Add field to checkout | + | * @snippet Add Ship to Store field at checkout if user is logged in as a dealer |
* @author André Le Comte | * @author André Le Comte | ||
**/ | **/ | ||
Line 29: | Line 29: | ||
function custom_checkout_field( $checkout ) { | function custom_checkout_field( $checkout ) { | ||
- | //Check if user is a dealer | + | //Check if user is signed in as a dealer i.e., user's role is 'customer' |
$user_is_dealer = is_user_a_dealer( customer ); | $user_is_dealer = is_user_a_dealer( customer ); | ||