技能 woocommerce-backend-dev
🛒

woocommerce-backend-dev

安全 ⚙️ 外部命令🌐 網路存取📁 檔案系統存取

WooCommerce 백엔드 PHP 코드 작성

WooCommerce 백엔드 개발은 클래스, 훅, 테스트에 대한 엄격한 프로젝트 규칙을 따라야 합니다. 이 기술은 WooCommerce 아키텍처와 제대로 통합되는 표준 준수 PHP 코드를 만들기 위한 포괄적인 가이드라인을 제공합니다.

支援: Claude Codex Code(CC)
📊 70 充足
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「woocommerce-backend-dev」。 세금 계산기에 대한 의존성 주입을 사용하여 배송비를 계산하는 새로운 클래스를 생성합니다.

預期結果:

  • src/Internal/Shipping/ShippingCalculator.php에 클래스 생성
  • 의존성 주입을 위해 @internal 주석이 있는 init() 메서드 사용
  • 정적 메서드로 표시된 계산에 대한 순수 정적 메서드
  • class-woocommerce.php의 버전에 기반한 @since 주석이 포함된 PHPDoc
  • tests/php/src/Internal/Shipping/ShippingCalculatorTest.php에 생성된 단위 테스트

正在使用「woocommerce-backend-dev」。 로그인한 사용자에 대해 할인율로 제품 가격을 수정하는 필터 훅을 추가합니다.

預期結果:

  • @since 버전 주석이 포함된 필터 훅 추가
  • 모든 훅 매개변수에 대한 @param 태그가 포함된 문서 블록
  • @internal 주석이 있는 handle_woocommerce_product_get_price라는 훅 콜백 메서드
  • 훅 설명이 포함된 do_action() 호출 위에 추가된 문서

安全審計

安全
v4 • 1/17/2026

This skill contains ONLY markdown documentation with no executable code, scripts, network calls, or file system access. It provides purely instructional content for developers writing WooCommerce backend PHP code. All 313 static findings are FALSE POSITIVES caused by the scanner detecting PHP syntax and code examples in documentation.

10
已掃描檔案
1,559
分析行數
3
發現項
4
審計總數

風險因素

⚙️ 外部命令 (221)
code-entities.md:20-24 code-entities.md:24-28 code-entities.md:28-30 code-entities.md:30-32 code-entities.md:32-36 code-entities.md:36-47 code-entities.md:47-51 code-entities.md:51-55 code-entities.md:55-70 code-entities.md:70-74 code-entities.md:74-85 code-entities.md:85-87 code-entities.md:87-95 code-entities.md:95-97 code-entities.md:97-101 code-entities.md:101 code-entities.md:101-102 code-entities.md:102 code-entities.md:102-106 code-entities.md:106-125 code-entities.md:125-129 code-entities.md:129-140 code-entities.md:140-146 code-entities.md:146-149 code-entities.md:149-153 code-entities.md:153-161 code-entities.md:161-165 code-entities.md:165-173 code-entities.md:173-182 coding-conventions.md:18-22 coding-conventions.md:22-26 coding-conventions.md:26-35 coding-conventions.md:35-51 coding-conventions.md:51 coding-conventions.md:51-58 coding-conventions.md:58 coding-conventions.md:58-62 coding-conventions.md:62-68 coding-conventions.md:68-72 coding-conventions.md:72-82 coding-conventions.md:82-90 coding-conventions.md:90-96 coding-conventions.md:96-100 coding-conventions.md:100-111 coding-conventions.md:111-115 coding-conventions.md:115-124 coding-conventions.md:124-128 coding-conventions.md:128-134 coding-conventions.md:134-137 coding-conventions.md:137-141 coding-conventions.md:141-144 data-integrity.md:23-45 data-integrity.md:45-53 data-integrity.md:53-75 data-integrity.md:75-83 data-integrity.md:83-94 data-integrity.md:94-115 data-integrity.md:115-121 data-integrity.md:121-132 data-integrity.md:132-136 data-integrity.md:136-149 data-integrity.md:149-153 data-integrity.md:153-164 dependency-injection.md:5 dependency-injection.md:10 dependency-injection.md:12 dependency-injection.md:12 dependency-injection.md:12 dependency-injection.md:16-44 dependency-injection.md:44-48 dependency-injection.md:48 dependency-injection.md:48-50 dependency-injection.md:50-53 dependency-injection.md:53-55 dependency-injection.md:55-64 dependency-injection.md:64-70 dependency-injection.md:70-75 dependency-injection.md:75-81 dependency-injection.md:81-85 dependency-injection.md:85-96 file-entities.md:13 file-entities.md:15 file-entities.md:17 file-entities.md:17 file-entities.md:19 file-entities.md:21 file-entities.md:21 file-entities.md:25 file-entities.md:27 file-entities.md:29 file-entities.md:38 file-entities.md:38 file-entities.md:42-50 file-entities.md:50-56 file-entities.md:56-61 file-entities.md:61-66 file-entities.md:66-70 file-entities.md:70-73 hooks.md:5 hooks.md:5 hooks.md:9-29 hooks.md:29-35 hooks.md:35-36 hooks.md:36-37 hooks.md:37-39 hooks.md:39-49 hooks.md:49-56 hooks.md:56-57 hooks.md:57-58 hooks.md:58 hooks.md:58-59 hooks.md:59-63 hooks.md:63-73 hooks.md:73-77 hooks.md:77-87 SKILL.md:14 SKILL.md:36 SKILL.md:37 SKILL.md:43 SKILL.md:45 SKILL.md:45 SKILL.md:46 SKILL.md:47 SKILL.md:47 type-annotations.md:14 type-annotations.md:14 type-annotations.md:14 type-annotations.md:26 type-annotations.md:30-43 type-annotations.md:43-47 type-annotations.md:47 type-annotations.md:47-48 type-annotations.md:48 type-annotations.md:48-49 type-annotations.md:49 type-annotations.md:49-51 type-annotations.md:51 type-annotations.md:51-55 type-annotations.md:55-64 type-annotations.md:64-72 type-annotations.md:72-77 type-annotations.md:77-79 type-annotations.md:79-80 type-annotations.md:80-86 type-annotations.md:86-91 type-annotations.md:91-97 type-annotations.md:97-100 type-annotations.md:100-106 type-annotations.md:106-119 type-annotations.md:119-123 type-annotations.md:123-132 type-annotations.md:132-136 type-annotations.md:136-144 type-annotations.md:144-150 type-annotations.md:150-153 type-annotations.md:153-157 type-annotations.md:157-158 type-annotations.md:158-159 unit-tests.md:19-75 unit-tests.md:75-81 unit-tests.md:81-82 unit-tests.md:82-83 unit-tests.md:83-84 unit-tests.md:84-85 unit-tests.md:85 unit-tests.md:85-86 unit-tests.md:86-93 unit-tests.md:93 unit-tests.md:93 unit-tests.md:93-94 unit-tests.md:94 unit-tests.md:94 unit-tests.md:94-96 unit-tests.md:96 unit-tests.md:96 unit-tests.md:96-100 unit-tests.md:100-102 unit-tests.md:102-109 unit-tests.md:109-113 unit-tests.md:113 unit-tests.md:113-117 unit-tests.md:117-131 unit-tests.md:131-139 unit-tests.md:139-150 unit-tests.md:150-154 unit-tests.md:154-168 unit-tests.md:168-172 unit-tests.md:172-182 unit-tests.md:182-188 unit-tests.md:188-189 unit-tests.md:189-190 unit-tests.md:190-194 unit-tests.md:194-198 unit-tests.md:198-208 unit-tests.md:208-295 unit-tests.md:295-301 unit-tests.md:301-308 unit-tests.md:308 unit-tests.md:308 unit-tests.md:308-312 unit-tests.md:312 unit-tests.md:312-313 unit-tests.md:313-317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317 unit-tests.md:317-321 unit-tests.md:321-339 unit-tests.md:339-345 unit-tests.md:345-347 unit-tests.md:347-348 unit-tests.md:348-352
🌐 網路存取 (5)
📁 檔案系統存取 (1)
審計者: claude 查看審計歷史 →

品質評分

38
架構
100
可維護性
87
內容
21
社群
100
安全
91
規範符合性

你能建構什麼

WooCommerce 확장 프로그램 생성

WooCommerce 코딩 표준을 따르고 플랫폼과 완벽하게 통합되는 사용자 정의 플러그인 개발

WooCommerce 코어에 기여

적절한 클래스 구조, 훅, 테스트 패턴을 사용하여 WooCommerce에 새로운 기능 추가

단위 테스트 작성

설립된 테스트 프레임워크를 사용하여 백엔드 기능에 대한 포괄적인 테스트 커버리지 생성

試試這些提示

새 PHP 클래스
src/Internal/Utils에 고객 데이터를 처리하는 새로운 클래스를 생성합니다. Logger에 대한 의존성 주입을 사용합니다. @since 주석이 포함된 적절한 PHPDoc을 추가합니다.
WordPress 훅
주문 완료 후 실행되는 새로운 액션 훅을 추가합니다. @param 태그와 @since 버전 주석이 포함된 적절한 문서 블록을 포함합니다.
단위 테스트
OrderProcessor 클래스에 대한 단위 테스트를 작성합니다. 성공적인 처리와 오류 처리 케이스를 테스트합니다. WC_Unit_Test_Case를 확장합니다.
데이터 조작
CustomerDataProcessor 클래스에 삭제 메서드를 추가합니다. 데이터 손실 방지를 위한 검증, 소유권 확인, 레이스 조건 검사를 포함합니다.

最佳實務

  • 삭제 또는 수정 작업을 수행하기 전에 항상 엔티티 상태와 소유권을 확인하여 데이터 손실 방지
  • DI 컨테이너 싱글톤 패턴을 일관되게 사용 - 동일한 서비스의 여러 인스턴스 생성 피하기
  • 모든 변경 후 그리고 커밋 전에 린팅과 테스트를 실행하여 코드 품질 보장

避免

  • 독립형 함수 추가 피하기 - 항상 테스트 가능성을 위해 클래스 메서드에 기능 래핑
  • call_user_func_array()에서 명명된 인수 사용 피하기 - 대신 위치 인수 사용
  • 데이터 작업 전 검증 건너뛰지 않기 - 항상 입력, 소유권, 엔티티 상태 확인

常見問題

WooCommerce는 어떤 PHP 버전을 지원합니까?
WooCommerce는 src/ 디렉토리의 최신 코드에 PHP 8.1 이상을 요구합니다.
새 클래스는 프로젝트 구조에서 어디에 속합니까?
새 클래스는 기본적으로 src/Internal/에 속합니다. 공개 클래스는 src/ 바로 아래에 배치합니다. 필요한 경우가 아니라면 includes/에 새 코드 추가를 피하세요.
이 기술은 WooCommerce DI 컨테이너와 어떻게 통합합니까?
이 기술은 WooCommerce의 의존성 주입 패턴 사용에 대한 가이드라인을 제공합니다. 클래스는 의존성 수신을 위해 @internal 주석이 있는 init() 메서드를 사용합니다. wc_get_container()->get( ClassName::class )를 사용하여 컨테이너에서 서비스 인스턴스를 검색합니다.
이 기술을 사용할 때 제 데이터가 안전합니까?
네. 이 기술은 문서화와 가이드라인만 제공합니다. 코드를 실행하거나 파일에 접근하거나 네트워크 요청을 하지 않습니다.
제 PHPStan 검사가 실패하는 이유는 무엇입니까?
제네릭 타입에 대한 적절한 @phpstan-param 주석을 사용했는지 확인하세요. 이 기술은 올바른 타입 추론을 가능하게 하는 @template 선언에 대한 패턴을 포함합니다.
일반 PHP 코딩 기술과 비교하여 어떻게 다릅니까?
이 기술은 WordPress 코딩 표준, WooCommerce DI 컨테이너, 적절한 훅 문서화 패턴을 포함하는 WooCommerce 특정 규칙을 제공합니다.