Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
# Development Tooling
# ───────────────────────────────
bin/
tests/
composer.lock
node_modules/
package-lock.json
package.json
packages/
tests/

# ───────────────────────────────
# Catch All ( Miscellaneous )
# ───────────────────────────────
*.dist
*.log
*.map
*.md
Expand Down
29 changes: 0 additions & 29 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
with:
target-branch: trunk
ignore-file: .distignore
include-paths: .wordpress-org
script-before: |
composer config -g github-oauth.github.com "${{ secrets.ACCESS_TOKEN }}"
[ -f composer.json ] && composer install --no-dev --optimize-autoloader
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ───────────────────────────────
node_modules/
vendor/
composer.lock


# Catch All ( Miscellaneous )
# ───────────────────────────────
Expand Down
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

51 changes: 51 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/admin.php?page=wc-donation-manager",
"preferredVersions": {
"php": "8.3",
"wp": "latest"
},
"features": {
"networking": true
},
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "setSiteOptions",
"options": {
"blogname": "Donation Manager Preview",
"blogdescription": "A live WordPress Playground preview for Donation Manager."
}
},
{
"step": "installPlugin",
"ifAlreadyInstalled": "skip",
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "woocommerce"
},
"options": {
"activate": true
}
},
{
"step": "installPlugin",
"ifAlreadyInstalled": "skip",
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "wc-donation-manager"
},
"options": {
"activate": true
}
},
{
"step": "runPHP",
"code": "<?php\nrequire_once '/wordpress/wp-load.php';\n\ndelete_transient( '_wc_activation_redirect' );\nupdate_option( 'woocommerce_onboarding_profile', array( 'skipped' => true ) );\nupdate_option( 'woocommerce_task_list_hidden', 'yes' );\nupdate_option( 'woocommerce_allow_tracking', 'no' );\nupdate_option( 'woocommerce_store_address', '123 Preview Street' );\nupdate_option( 'woocommerce_store_city', 'Playground' );\nupdate_option( 'woocommerce_default_country', 'US:CA' );\nupdate_option( 'woocommerce_currency', 'USD' );\nupdate_option( 'woocommerce_product_type', 'both' );\nupdate_option( 'wcdm_skip_cart', 'yes' );\nupdate_option( 'wcdm_fast_checkout', 'no' );\nupdate_option( 'wcdm_editable_cart_price', 'yes' );\nupdate_option( 'wcdm_disabled_coupon_field', 'yes' );\nupdate_option( 'wcdm_disabled_order_note', 'yes' );\nupdate_option( 'wcdm_disabled_tax', 'yes' );\nupdate_option( 'wcdm_goal_behavior', 'continue' );\n\nif ( class_exists( 'WC_Install' ) ) {\n\tWC_Install::create_pages();\n}\n\n$campaign_id = wp_insert_post(\n\tarray(\n\t\t'post_type' => 'wcdm_campaigns',\n\t\t'post_title' => 'Community Relief Fund',\n\t\t'post_content' => '<p>Help fund emergency supplies, meals, and local support services for families who need immediate assistance.</p>',\n\t\t'post_status' => 'publish',\n\t\t'meta_input' => array(\n\t\t\t'wcdm_goal_amount' => '5000',\n\t\t\t'_raised_amount' => '1850',\n\t\t\t'_end_date' => gmdate( 'Y-m-d', strtotime( '+90 days' ) ),\n\t\t\t'wcdm_goal_behavior' => 'continue',\n\t\t),\n\t)\n);\n\nif ( is_wp_error( $campaign_id ) || ! class_exists( 'WCDM_Donation_Product' ) ) {\n\treturn;\n}\n\n$product = new WCDM_Donation_Product();\n$product->set_name( 'Donate to the Community Relief Fund' );\n$product->set_description( '<p>Choose a suggested amount or enter a custom donation to support this campaign.</p>' );\n$product->set_status( 'publish' );\n$product->set_catalog_visibility( 'visible' );\n$product->set_regular_price( '25' );\n$product->set_price( '25' );\n$product->set_virtual( true );\n$product->set_sold_individually( true );\n$product->set_manage_stock( false );\n$product->set_stock_status( 'instock' );\n\n$product_id = $product->save();\n\nif ( $product_id ) {\n\twp_set_object_terms( $product_id, 'donation', 'product_type', false );\n\tupdate_post_meta( $product_id, 'wcdm_campaign_id', $campaign_id );\n\tupdate_post_meta( $product_id, 'wcdm_is_predefined_amounts', 'yes' );\n\tupdate_post_meta( $product_id, 'wcdm_predefined_amounts_title', 'Suggested amounts' );\n\tupdate_post_meta( $product_id, 'wcdm_predefined_amounts', array( '25', '50', '100' ) );\n\tupdate_post_meta( $product_id, 'wcdm_is_custom_amount', 'yes' );\n\tupdate_post_meta( $product_id, 'wcdm_amount_increment_steps', '1.00' );\n\tupdate_post_meta( $product_id, 'wcdm_min_amount', '5' );\n\tupdate_post_meta( $product_id, 'wcdm_max_amount', '1000' );\n\n\tif ( function_exists( 'wc_delete_product_transients' ) ) {\n\t\twc_delete_product_transients( $product_id );\n\t}\n}\n"
}
]
}
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2025 PluginEver
* Licensed under the GPLv2+ license.
*/
s
/*jslint browser: true */
/*global jQuery:false */
jQuery(document).ready(function ($) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
? Math.min((raised / goal) * 100, 100)
: 0;

console.log(percentage);


$progressCard
.find('.progress-bar')
.css('width', percentage + '%');
Expand Down
File renamed without changes.
23 changes: 7 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,19 @@
"repositories": [
{
"type": "vcs",
"url": "git@github.com:byteever/bytekit-plugin.git"
},
{
"type": "vcs",
"url": "git@github.com:byteever/bytekit-settings.git"
"url": "git@github.com:byteever/plugin.git"
}
],
"require": {
"php": ">=7.4",
"byteever/bytekit-plugin": "dev-trunk",
"byteever/bytekit-settings": "dev-trunk"
"byteever/plugin": "^1.0"
},
"require-dev": {
"byteever/byteever-sniffs": "^1.1.3"
},
"autoload": {
"psr-4": {
"WooCommerceDonationManager\\": "includes/"
"PluginEver\\DonationManager\\": "includes/"
}
},
"config": {
Expand All @@ -37,23 +32,19 @@
"makepot": "wp --allow-root i18n make-pot . --include=*.php,assets,includes,templates --domain=wc-donation-manager",
"phpcs": "php ./vendor/bin/phpcs --standard=phpcs.xml -s -v",
"phpcbf": "php ./vendor/bin/phpcbf --standard=phpcs.xml -v",
"test:setup": "bash ./bin/setup-tests.sh wordpress_test root root localhost trunk && phpunit",
"test": "phpunit",
"strauss": [
"test -f /tmp/strauss.phar || curl -o /tmp/strauss.phar -L https://github.com/BrianHenryIE/strauss/releases/download/0.24.1/strauss.phar",
"@php /tmp/strauss.phar",
"@composer dump-autoload --no-scripts",
"find ./vendor/byteever -type f -name '*.php' -exec perl -i -pe \"s/'bytekit-textdomain'/'wc-donation-manager'/g\" {} +"
"@composer dump-autoload --no-scripts"
]
},
"extra": {
"strauss": {
"target_directory": "vendor",
"namespace_prefix": "WooCommerceDonationManager\\",
"classmap_prefix": "WooCommerceDonationManager__",
"namespace_prefix": "PluginEver\\DonationManager\\",
"classmap_prefix": "PluginEver_DonationManager__",
"packages": [
"byteever/bytekit-plugin",
"byteever/bytekit-settings"
"byteever/plugin"
]
}
}
Expand Down
Loading
Loading