Skip to content

Commit

Permalink
Merge pull request #196 from awesomemotive/release/4.7.2
Browse files Browse the repository at this point in the history
`release/4.7.2`
  • Loading branch information
spencerfinnell authored Mar 13, 2023
2 parents 02fcc4a + bafd100 commit 7c4aad8
Show file tree
Hide file tree
Showing 38 changed files with 1,025 additions and 152 deletions.
71 changes: 71 additions & 0 deletions data/templates/airport-shuttle-payment-form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"id": "8297b4f2-6810-44ab-b826-797e70f8db62",
"created_at": "2023-03-08 00:00:00",
"updated_at": "2023-03-08 00:00:00",
"license": [ "personal", "plus", "professional", "ultimate", "elite" ],
"categories": [ "products-services" ],
"keywords": [ "airport", "payment", "shuttle", "driver" ],
"slug": "airport-shuttle-payment-form",
"name": "Airport Shuttle Payment Form",
"description": "Collect a payment for shuttle service from airport to hotel district or accommodations.",
"url": "",
"data": {
"title": "Airport Shuttle Payment",
"description": "",
"type": "embedded",
"payment_methods": [ "card" ],
"fields": [
{
"type": "customer_name",
"label": "Passenger Name",
"required": "yes"
},
{
"type": "email",
"label": "Email Address"
},
{
"type": "telephone",
"label": "Phone Number",
"required": "yes"
},
{
"type": "plan_select",
"label": "Select Number of Bags"
},
{
"type": "dropdown",
"label": "Hotel Destination, Downtown Locations",
"options": "Marriott, Hilton, Best Western, Holiday Inn",
"required": "yes",
"metadata": "Hotel"
},
{
"type": "card",
"label": "Credit Card"
},
{
"type": "checkout_button"
}
],
"prices": [
{
"label": "Small Carry On, +1 Bag",
"unit_amount": 2500,
"default": true
},
{
"label": "Small Carry On, +2 Bags",
"unit_amount": 3500
},
{
"label": "Small Carry On, +3 Bags (max)",
"unit_amount": 5500
},
{
"label": "Return Trip",
"unit_amount": 2000
}
]
}
}
5 changes: 0 additions & 5 deletions data/templates/klarna-payment-form.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
"type": "email",
"label": "Email Address"
},
{
"type": "address",
"billing-container-label": "",
"required": "yes"
},
{
"type": "plan_select",
"label": ""
Expand Down
91 changes: 91 additions & 0 deletions data/templates/meal-prep-service-form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"id": "d6c26327-4f3f-47b9-90d7-a1109b201a90",
"created_at": "2023-03-08 00:00:00",
"updated_at": "2023-03-08 00:00:00",
"license": [ "personal", "plus", "professional", "ultimate", "elite" ],
"categories": [ "products-service" ],
"keywords": [ "payment", "service", "meal prep", "food" ],
"slug": "meal-prep-service-form",
"name": "Meal Prep Service Form",
"description": "Allow clients to pay for the weekly meals received through your delivery service.",
"url": "",
"data": {
"title": "Meal Prep Service Form",
"description": "",
"type": "embedded",
"payment_methods": [ "card" ],
"fields": [
{
"type": "customer_name",
"label": "Customer Name",
"required": "yes"
},
{
"type": "email",
"label": "Email Address"
},
{
"type": "telephone",
"label": "Phone Number",
"required": "yes",
"placeholder": "A follow up call will be made"
},
{
"type": "plan_select",
"label": "Select number of meals per day"
},
{
"type": "number",
"label": "Number of days per week",
"default": 1,
"required": "yes",
"quantity": "yes",
"metadata": "Number of Days"
},
{
"type": "text",
"label": "Please list food preferences, allergies, etc",
"multiline": "yes",
"required": "yes",
"metadata": "Food Prefs"
},
{
"type": "text",
"label": "Pick up times, and additional notes as needs",
"multiline": "yes",
"required": "yes",
"metadata": "Pick Up Time and Notes"
},
{
"type": "card",
"label": "Credit Card"
},
{
"type": "checkout_button"
}
],
"prices": [
{
"label": "1 Meal Per Day",
"unit_amount": 1200,
"default": true
},
{
"label": "2 Meals Per Day",
"unit_amount": 2400
},
{
"label": "3 Meals Per Day",
"unit_amount": 3600
},
{
"label": "6 Meals Per Day (small family)",
"unit_amount": 7500
},
{
"label": "9 Meals Per Day (large family)",
"unit_amount": 12500
}
]
}
}
104 changes: 104 additions & 0 deletions data/templates/walking-tour-payment-form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"id": "c1e8b717-3ece-4353-868b-b77db97f012a",
"created_at": "2023-03-08 00:00:00",
"updated_at": "2023-03-08 00:00:00",
"license": [ "personal", "plus", "professional", "ultimate", "elite" ],
"categories": [ "products-services" ],
"keywords": [ "walking tour", "payment", "service" ],
"slug": "walking-tour-payment-form",
"name": "Walking Tour Payment Form",
"description": "Collect a payment for leading a guided tour around your favorite city.",
"url": "",
"data": {
"title": "Walking Tour Payment",
"description": "",
"type": "embedded",
"payment_methods": [ "card" ],
"fields": [
{
"type": "customer_name",
"label": "Customer Name",
"required": "yes"
},
{
"type": "email",
"label": "Email Address"
},
{
"type": "telephone",
"label": "Phone Number",
"placeholder": "A follow up call may be necessary",
"required": "yes"
},
{
"type": "text",
"label": "Price is per family, up to 4 people",
"placeholder": "Please list any special requirements",
"multiline": "yes",
"required": "no",
"metadata": "Notes"
},
{
"type": "plan_select",
"label": "Choose the day of your walk",
"display_type": "dropdown"
},
{
"type": "card",
"label": "Credit Card"
},
{
"type": "checkout_button"
}
],
"prices": [
{
"label": "June 3rd",
"unit_amount": 2000,
"default": true
},
{
"label": "June 10th",
"unit_amount": 2000
},
{
"label": "June 17th",
"unit_amount": 2000
},
{
"label": "June 24th",
"unit_amount": 2000
},
{
"label": "July 1st",
"unit_amount": 2000
},
{
"label": "July 8th",
"unit_amount": 2000
},
{
"label": "July 15th",
"unit_amount": 2000
},
{
"label": "July 22nd",
"unit_amount": 2000
},
{
"label": "July 29th",
"unit_amount": 2000
}
],
"extra": {
"_inventory": "yes",
"_inventory_behavior": "combined",
"_inventory_combined": {
"initial": 20,
"available": 20
},
"_schedule_end": "yes",
"_schedule_end_gmt": "+ 1 month 00:00:00"
}
}
}
62 changes: 58 additions & 4 deletions includes/core/admin/class-menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,61 @@ public function __construct() {
// Links and meta content in plugins page.
add_filter( 'plugin_action_links_' . self::$plugin, array( __CLASS__, 'plugin_action_links' ), 10, 5 );

// Footer promotion.
add_action( 'in_admin_footer', array( $this, 'in_footer_text' ) );

// Footer review request.
add_filter( 'admin_footer_text', array( $this, 'add_footer_text' ) );
}

/**
* Outputs additional content in the footer promoting WP Simple Pay.
*
* @since 4.7.2
*
* @return void
*/
public function in_footer_text() {
if ( ! simpay_is_admin_screen() ) {
return;
}

$license = simpay_get_license();

$links = array(
array(
'url' => $license->is_lite()
? 'https://wordpress.org/support/plugin/stripe/'
: simpay_ga_url(
'https://wpsimplepay.com/my-account/support',
'footer',
'Support'
),
'text' => __( 'Support', 'stripe' ),
'target' => '_blank',
),
array(
'url' => simpay_ga_url(
'https://wpsimplepay.com/docs',
'footer',
'Docs'
),
'text' => __( 'Docs', 'stripe' ),
'target' => '_blank',
),
array(
'url' => admin_url(
'edit.php?post_type=simple-pay&page=simpay-about-us'
),
'text' => __( 'Free Plugins', 'stripe' ),
),
);

$title = __( 'Made with ♥ by the WP Simple Pay Team', 'stripe' );

include_once SIMPLE_PAY_DIR . 'views/admin-footer-promo.php'; // @phpstan-ignore-line
}

/**
* Outputs "please rate" text.
*
Expand All @@ -64,7 +116,7 @@ public function add_footer_text( $footer_text ) {

return sprintf(
/* translators: %1$s Opening strong tag, do not translate. %2$s Closing strong tag, do not translate. %3$s Opening anchor tag, do not translate. %4$s Closing anchor tag, do not translate. */
__( 'Please rate %1$sWP Simple Pay%2$s %3$s★★★★★%4$s on %3$sWordPress.org%4$s to help us spread the word. Thank you from the WP Simple Pay team!', 'stripe' ),
__( 'Please rate %1$sWP Simple Pay%2$s %3$s★★★★★%4$s on %3$sWordPress.org%4$s to help us spread the word.', 'stripe' ),
'<strong>',
'</strong>',
'<a href="https://wordpress.org/support/plugin/stripe/reviews/?filter=5#new-post" rel="noopener noreferrer" target="_blank">',
Expand Down Expand Up @@ -98,9 +150,11 @@ public static function plugin_action_links( $action_links, $file ) {
}

// Settings.
$settings_url = Settings\get_url( array(
'section' => 'stripe',
) );
$settings_url = Settings\get_url(
array(
'section' => 'stripe',
)
);

$links[] = sprintf(
'<a href="%s">%s</a>',
Expand Down
Loading

0 comments on commit 7c4aad8

Please sign in to comment.