當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WCV_Vendors::is_pending方法代碼示例

本文整理匯總了PHP中WCV_Vendors::is_pending方法的典型用法代碼示例。如果您正苦於以下問題:PHP WCV_Vendors::is_pending方法的具體用法?PHP WCV_Vendors::is_pending怎麽用?PHP WCV_Vendors::is_pending使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WCV_Vendors的用法示例。


在下文中一共展示了WCV_Vendors::is_pending方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: show_extra_profile_fields

    /**
     * Show the PayPal field and commision due table
     *
     * @param unknown $user
     */
    public function show_extra_profile_fields($user)
    {
        if (!WCV_Vendors::is_vendor($user->ID) && !WCV_Vendors::is_pending($user->ID)) {
            return;
        }
        ?>
		<h3><?php 
        _e('WC Vendors', 'wcvendors');
        ?>
</h3>
		<table class="form-table">
			<tbody>
			<?php 
        do_action('wcvendors_admin_before_shop_html', $user);
        ?>
			<tr>
				<th scope="row">Shop HTML</th>
				<td>
					<label for="pv_shop_html_enabled">
						<input name="pv_shop_html_enabled" type="checkbox"
							   id="pv_shop_html_enabled" <?php 
        checked(true, get_user_meta($user->ID, 'pv_shop_html_enabled', true), $echo = true);
        ?>
/>
						<?php 
        _e('Enable HTML for the shop description', 'wcvendors');
        ?>
					</label>
				</td>
			</tr>
			<?php 
        do_action('wcvendors_admin_after_shop_html', $user);
        ?>
			<tr>
				<th><label for="pv_shop_name"><?php 
        _e('Shop name', 'wcvendors');
        ?>
</label></th>
				<td><input type="text" name="pv_shop_name" id="pv_shop_name"
						   value="<?php 
        echo get_user_meta($user->ID, 'pv_shop_name', true);
        ?>
" class="regular-text">
				</td>
			</tr>
			<?php 
        do_action('wcvendors_admin_after_shop_name', $user);
        ?>
			<tr>
				<th><label for="pv_paypal"><?php 
        _e('PayPal E-mail', 'wcvendors');
        ?>
 <span
							class="description">(<?php 
        _e('required', 'wcvendors');
        ?>
)</span></label></th>
				<td><input type="email" name="pv_paypal" id="pv_paypal"
						   value="<?php 
        echo get_user_meta($user->ID, 'pv_paypal', true);
        ?>
" class="regular-text">
				</td>
			</tr>
			<?php 
        do_action('wcvendors_admin_after_paypal', $user);
        ?>
			<tr>
				<th><label for="pv_custom_commission_rate"><?php 
        _e('Commission rate', 'wcvendors');
        ?>
 (%)</label></th>
				<td><input type="number" step="0.01" max="100" min="0" name="pv_custom_commission_rate" placeholder="<?php 
        _e('Leave blank for default', 'wcvendors');
        ?>
" id="pv_custom_commission_rate"
						   value="<?php 
        echo get_user_meta($user->ID, 'pv_custom_commission_rate', true);
        ?>
" class="regular-text">
				</td>
			</tr>
			<?php 
        do_action('wcvendors_admin_after_commission_due', $user);
        ?>
			<tr>
				<th><label for="wcv_give_vendor_tax"><?php 
        _e('Give Tax', 'wcvendors');
        ?>
 (%)</label></th>
				<td>
					<label for="wcv_give_vendor_tax">
						<input name="wcv_give_vendor_tax" type="checkbox"
							   id="wcv_give_vendor_tax" <?php 
        checked(true, get_user_meta($user->ID, 'wcv_give_vendor_tax', true), $echo = true);
//.........這裏部分代碼省略.........
開發者ID:stodorovic,項目名稱:wcvendors,代碼行數:101,代碼來源:class-admin-users.php

示例2: wc_print_notices

<?php

if (function_exists('wc_print_notices')) {
    wc_print_notices();
} else {
    global $woocommerce;
    wc_print_notices();
}
?>

<?php 
if (WCV_Vendors::is_pending(get_current_user_id())) {
    ?>

	<p><?php 
    _e('Your account has not yet been approved to become a vendor.  When it is, you will receive an email telling you that your account is approved!', 'wcvendors');
    ?>
</p>

<?php 
} else {
    ?>

	<p><?php 
    _e('Your account is not setup as a vendor yet.  If you would like to register, please complete this page!', 'wcvendors');
    ?>
</p>

	<?php 
    if (WC_Vendors::$pv_options->get_option('show_vendor_registration')) {
        ?>
開發者ID:shubham79,項目名稱:Jhintaak,代碼行數:31,代碼來源:denied.php


注:本文中的WCV_Vendors::is_pending方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。