PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
subscription / assets / js / wp_subscription_paypal-block.js

wp_subscription_paypal-block.js in Subscriptions for WooCommerce with Stripe Recurring Payments 2.2.0, at assets/js/wp_subscription_paypal-block.js

33 lines 967 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const settings = window.wc.wcSettings.getSetting("wp_subscription_paypal_data", {});
2
3 const createLabel = (title, iconUrl) => {
4 return wp.element.createElement(
5 "span",
6 {
7 style: { width: "100%" },
8 },
9 title,
10 wp.element.createElement("img", {
11 src: iconUrl,
12 alt: title,
13 style: { float: "right" },
14 }),
15 );
16 };
17 const Content = () => {
18 return window.wp.htmlEntities.decodeEntities(settings.description || "");
19 };
20
21 const Block_Gateway = {
22 name: "wp_subscription_paypal",
23 label: createLabel(settings.title, settings.icon),
24 content: Object(window.wp.element.createElement)(Content, null),
25 edit: Object(window.wp.element.createElement)(Content, null),
26 canMakePayment: () => true,
27 ariaLabel: window.wp.htmlEntities.decodeEntities(settings.title) || window.wp.i18n.__("PayPal", "subscription"),
28 supports: {
29 features: settings.features,
30 },
31 };
32 window.wc.wcBlocksRegistry.registerPaymentMethod(Block_Gateway);
33