当前位置: 首页>>代码示例>>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;未经允许,请勿转载。