WP Manifestindependent plugin directory
manifest / ecommerce / r2-wc-product-addon

R2 WC Product Addon WP Registry grade C-. High-severity findings · 1 findingWP RegistryHigh-severity findings · 1 findingOpen the reportC-

WC 商品加購功能外掛,整合AJAX加入購物車,及product bundle套件客製化功能

★ 2stars
53release downloads
≈10active sites
v1.2.15latest · 2 years ago

Install

Download r2-wc-product-addon-release.zip From the v1.2.15 release on GitHub, Jun 12, 2024

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/s0985514623/r2-wc-product-addon/releases/download/v1.2.15/r2-wc-product-addon-release.zip
Updates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.

R2-WC-Product-Addon (R2-WCPA) 外掛介紹

一句話說明:Woocommerce商品加價購

現在外掛有出的加購大概分為兩種
一種是常說的加價購(像是WPC Frequently Bought Together)
一種是叫bundle綑綁銷售(像是WPC Grouped Product)

差別比較像是

  1. 加價購(該外掛是這一款)
    是A可以去自由的加B加C,每個商品都是各自存在的 EX:我買了一件衣服,可以再加多少錢買一件褲子

  2. bundle綑綁銷售
    比較像是一個組合商品,把其他子商品都加進來綑綁銷售 EX:我有一套網路架站教學課程包,裏面包含了JS課程、HTML課程、CSS課程

使用方法

  • 啟用外掛之後可以在商品資料中看到多一個頁籤叫加價購商品
    只有在簡單商品與可變商品會顯示
    功能:可以拖移順序、可以新增、可以刪除、可以設定價格

  • 選擇要加入的商品
    商品分類會依分類層級顯示

  • 前台顯示
    Render 在這支hook上面,加入購物車按鈕之前

add_action('woocommerce_before_add_to_cart_button', 'r2_wcpa_render');

功能:可變商品的預設值會跟著加購商品預設值變動
當改變屬性值的時候會自動勾選加購商品
自訂AJAX事件,當加入購物車的時候會自動加入加購商品不刷新頁面
目前設定是只有會員才能下單,非會員會跳出請登入視窗,未來有需要再單獨拉頁面出來設定
當購物車中主商品不存在時,加購商品也會被移除
有整合ELEMENTOR編輯器的側選單,如果有開啟Automatically Open Cart功能的話,加購商品也會自動打開

  • 購物車頁顯示
    Render 在這支hook上面,購物車表格之後
    add_action('woocommerce_after_cart_table', 'r2_wcpa_render');

    功能:已在購物車中的加購商品不會出現在下方列表
    如果有相同的加購商品則會合併取價格低的出現
    整合js事件added_to_cart刷新畫面
    點擊列表中的加購商品會跳到商品頁面並加上urlParams,再次加入購物車會是加價購的優惠價格

參考

  • 1.React腳手架來源 J7
  • 2.外掛開發參考 J7

Releases

10 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.2.15 latest
Jun 12, 2024 2 years ago
r2-wc-product-addon-release.zip
6
Apr 9, 2024 2 years ago
r2-wc-product-addon-release.zip
9
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
10
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
7
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
4
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
2
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
3
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
1
Apr 8, 2024 2 years ago
r2-wc-product-addon-release.zip
3
Feb 21, 2024 2 years ago
r2-wc-product-addon-release.zip
8

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

C- grade

Security

R2 WC Product Addon 1.2.15 · audited by WP Registry

High-severity findings.

1 high
Audited release
1.2.15
Findings
1
Worst severity
high
Content hash
080381c710583cdc101341c3…

Findings

  • high Unauthenticated dump of all post meta via REST and AJAX

    information_disclosure

    register_rest_route('wrp', 'postmeta/(?P<id>\d+)') has no permission_callback, so WordPress treats GET /wp-json/wrp/postmeta/{id} as public. The callback uses get_post_status($id) as an existence check (truthy for draft/private/trash/wc-completed/etc.) then returns get_post_meta($id) including protected keys. That bypasses core REST protected-meta rules and exposes WooCommerce order PII (_billing_email, _billing_phone, addresses), _order_key (order-received/pay URLs), payment-method meta, and product internals. A parallel nopriv AJAX action addon_handle_get_post_meta returns the same data after a nonce that GET /wp-json/wrp/ajaxnonce freely issues.

    inc/utils/class/class-api.php:18-47

    Recommendation

    Add a permission_callback that requires current_user_can('edit_post', $post_id) or a tighter capability. Do not return protected (underscore) meta to unauthenticated clients. Remove or similarly lock down addon_handle_get_post_meta and the public /wrp/ajaxnonce mill.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.