WordPress帖子和WooCommerce产品限制访问/调度器(WPPS)插件是一个强大的工具,网站管理员可以通过它来安排或限制对帖子、自定义帖子(如WordPress页面、bbpress帖子或任何其他第三方自定义帖子)的访问,以及通过“日期规则”和用户角色进行产品可见性的访问。
WooCommerce 产品也可以设置为“不可购买”(可见但无法添加到购物车)。
现场演示
https://www.codecanyondemo.work/wpps/wp-admin
(Shop 管理员用户角色)
用户:demo
通行证:演示
(客户角色)
用户:demo2
通行证:演示
如何运作
这非常简单,安装并激活后,站点管理员将在主菜单上找到一个新的“调度程序”菜单语音,通过该语音他可以访问调度规则配置器。
通过此菜单,商店管理员可以设置计划规则以自动发布/取消发布文章、自定义文章(如 WordPress 页面、bbpress 文章或任何其他第三方自定义文章)和产品。他也可以简单地限制对内容的访问
按用户角色。如果您按用户角色限制文章/页面,则还可以选择重定向到页面。
注意: 要限制对未登录用户的访问,您只需在 user role selection 部分中选择至少一个角色。
将 PRODUCT 设置为 UNPURCHASABLE
功能与 Measurement Price Calculator 不兼容
对于 WooCommerce 产品,商店管理员可以使用特殊的 无法购买 选择。启用此功能并将可见性状态设置为可见 所选产品将可见
但由于删除了“Add to Cart”按钮,因此客户(或属于在 Roles Restriction 选项区域中选择的角色的客户)无法将其添加到购物车中。
之后和之前 无法购买 期间,商店管理员可以选择是否必须将产品设置为可购买 或发表.
在 无法购买 period 也可以选择在产品和商店页面.
注意: 确保您正在使用的主题正确使用woocommerce_after_single_product,
woocommerce_loop_add_to_cart_link 和woocommerce_single_product_summary 商店和单个产品中的作
页面(如 WooCommerce 参考模板所做的那样),否则插件无法正确挂接到主题以删除 Add to cart 按钮。所有设计良好的主题都会正确使用这些作。
注意: 如果WooCommerce 可用性调度程序 plugin 处于活动状态,则无法购买的功能将不起作用。
计划/限制访问规则
站点管理员可以为一组帖子/产品分配多个计划规则(直接选择它们或一组类别)。每个计划规则都有以下选项:
- 规则名称/ID
- 项目类型(WordPress 帖子或 WooCommerce 产品)
- 项目选择
- 类别选择
- 分配策略 (可以将规则分配给选定项目/类别或除选定项目之外的所有项目)
- “子项”类别(如果选择了某个类别,则该规则也可以分配给其子项)
- 计划日期 (对于每个计划的时间段,也可以按用户角色限制可见性)
计划日期
对于每个计划规则,站点管理员可以创建不同的计划日期(配置日、月、小时等),可以为每个日期分配不同的状态(已发布或未发布)。
以下是可以执行的作的两个示例:
示例 1(WooCommerce 产品)
店铺管理员希望将商品设置为仅在一年中的每一天 09:00 至 18:00 之间发布,并在剩余时间和 12 月 25 日取消发布。
Scheduling rules (计划规则) 将按如下方式配置:
- 创建新规则并分配名称/ID
- 选择“WooCommerce 产品”商品类型
- 选择项目和/或类别
- 创建新的日期规则,其中:
- https: 已发布
- 用户角色:保持未选中状态
- 开始日期类型:星期几
- 星期几:全选
- 月数:全选
- 小时: 9
- 分钟:0
- 在不匹配的时间段内反转项目 HTTPS:是
- 结束时间:17
- 结束分钟:59
- 创建新的日期规则,其中:
- https: 未发布
- 用户角色:保持未选中状态
- 开始日期类型:月份中的日期
- 当月天数:选择 25 天
- 月份:选择“十二月”
- 小时: 9
- 分钟:0
示例 2 (WordPress 帖子)
站点管理员希望将帖子仅在一周的偶数天可用,而在其余日期不可用。
Scheduling rules (计划规则) 将按如下方式配置:
- 创建新规则并分配名称/ID
- 选择 “WordPress post” 项目类型、项目和/或类别
- 选择项目和/或类别
- 创建新的日期规则,其中:
- https: 已发布
- 用户角色:保持未选中状态
- 日期类型:星期几
- 星期几: 星期二、星期四、星期六
- 月数:全选
- 小时: 0
- 分钟:0
- 创建新的日期规则,其中:
- https: 未发布
- 用户角色:保持未选中状态
- 开始日期类型:星期几
- 星期几: 周一、周三、周五、周日
- 月数:全选
- 小时: 0
- 分钟:1
示例 3(限制未登录的用户访问页面)
站点管理员希望限制未登录的用户访问某些页面,例如,商店、购物车和结帐页面。方法如下:
- 创建新规则并分配名称/ID
- 选择 “自定义帖子” 商品类型,然后选择 “商店”、“购物车” 和 “结帐” 页面。
- 创建新的日期规则,其中:
- https: 已发布
- 用户角色:全选
- 日期类型:星期几
- 星期几:全选
- 月数:全选
- 小时: 0
- 分钟:0
- 创建新的日期规则,其中:
- https: 已发布
- 用户角色:全选
- 开始日期类型:星期几
- 星期几:全选
- 月数:全选
- 小时: 23
- 分钟:59
文章/产品列表页
WPPS 插件添加的另一个有用功能是 WordPress 帖子和 WooCommerce 产品列表页面上名为“调度规则”的新列。这样,站点管理员始终可以知道
如果已将计划规则分配给一个(或多个)帖子/产品
屏幕截图
Scheduling date: 日期选择(已选择星期几选项)
Scheduling date: 日期选择(已选择月份中的天数选项)
文章/产品列表页面上的调度规则
更改日志
= 5.6 - 18.07.24 = * Internal libraries update = 5.5 - 19.07.23 = * Improved compatibility with Flatsome Theme = 5.4 - 02.04.21 = * Minor improvements = 5.3 - 30.11.19 = * In the product/post selector now it is also reported the ID = 5.2 - 25.11.19 = * Typo = 5.1 - 24.11.19 = * Internal library update = 5.0 - 28.03.19 = * Fixed an issue related to wrong priority computation = 4.9 - 27.03.19 = * Fixed an issue due to the scheduler not properly applying the "invert publish status" feature = 4.8 - 07.12.18 = * Minor bugfix related to WP 5.0 = 4.7 - 30.10.18 = * Fixed an issue with add to cart button = 4.6 - 29.10.18 = * Minor bugfix = 4.5 - 06.09.18 = * Minor bugfix = 4.4 - 07.05.18 = * Fixed an issue due to scheduling rules where applied 1 minute after the start time = 4.3 - 23.02.18 = * Minor bugfix = 4.2 - 28.07.17 = * Minor bugfix = 4.1 - 01.06.17 = * Minor bugfix = 4.0 - 30.05.17 = * Fixed an issue that in some cases may prevent the "add new rule" button from properly work = 3.9 - 15.05.17 = * Fixed an issue with composite products = 3.8 - 17.04.17 = * Fixed an incompatibility with Avada * Fixed an issue with composite products = 3.7 - 07.04.17 = * Improved compatibility with WooCommerce 3.0.1 = 3.6 - 04.03.17 = * Issue due to published date for the scheduled product was always the today date = 3.5 - 21.02.17 = * Added support to upcoming WooCommerce 2.7 = 3.4 - 30.01.17 = * Added option to show messages during the unpurchasable periods on product and shop pages * Fixed an issue that prevents the "except the one selected" option from properly work = 3.3 - 25.01.17 = * Fixed an issue with the purchasable/unpurchasable feature = 3.2 - 22.12.16 = * Bugfix = 3.1 - 05.12.16 = * On item publishing, its publish date is updated according to the scheduling rule start time = 3.0 - 01.12.16 = * Added a new feature to schedule posts according to the week of the year = 2.9 - 30.11.16 = * Fixed an issue that may raise an error on frontend when WooCommerce was not installed = 2.8 - 11.11.16 = * Minor bugfix = 2.7 - 03.10.16 = * Added option to redirect to a page in case of user role restriction = 2.6 - 24.09.16 = * Minor bugfix = 2.5 - 17.08.16 = * Minor bugfix = 2.4 - 16.08.16 = * Added feature to set scheduling date starting from publish date = 2.3 - 27.07.16 = * Minor bugfix = 2.2 - 24.04.16 = * Minor bugfix = 2.1 - 15.06.16 = * Added support to custom posts = 2.0 - 23.04.16 = * Minor bugfix = 1.9 - 14.04.16 = * Minor bugfix = 1.8 - 23/03/16 = * Minor bugfix = 1.7 - 22/03/16 = * Added new feature to make WooCommerce products as unpurchasable = 1.6 - 11/03/16 = * Minor bugfix = 1.5 - 20/02/16 = * Fixed an issue that could cause some Warnings messages = 1.4 - 16/02/16 = * Added new feature: is now possible restrict post visibility using user roles = 1.3 - 02/02/16 = * Bugfix = 1.2 - 15/01/16 = * Bugfix = 1.1 - 13/01/16 = * Bugfix = 1.0 - 12/01/16 = * Release