Merge pull request #783 from woocommerce/pcp-276-plugin-links

Add links to docs & support in plugin
This commit is contained in:
Emili Castells 2022-08-18 12:18:08 +02:00 committed by GitHub
commit bc191d8efe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,6 +143,44 @@ define( 'PPCP_FLAG_SEPARATE_APM_BUTTONS', apply_filters( 'woocommerce_paypal_pay
}
);
// Add links below the description on the Plugins page.
add_filter(
'plugin_row_meta',
function( $links, $file ) {
if ( plugin_basename( __FILE__ ) !== $file ) {
return $links;
}
return array_merge(
$links,
array(
sprintf(
'<a href="%1$s">%2$s</a>',
'https://woocommerce.com/document/woocommerce-paypal-payments/',
__( 'Documentation', 'woocommerce-paypal-payments' )
),
sprintf(
'<a href="%1$s">%2$s</a>',
'https://woocommerce.com/my-account/create-a-ticket/',
__( 'Get help', 'woocommerce-paypal-payments' )
),
sprintf(
'<a href="%1$s">%2$s</a>',
'https://woocommerce.com/feature-requests/woocommerce-paypal-payments/',
__( 'Request a feature', 'woocommerce-paypal-payments' )
),
sprintf(
'<a href="%1$s">%2$s</a>',
'https://github.com/woocommerce/woocommerce-paypal-payments/issues/new?assignees=&labels=type%3A+bug&template=bug_report.md',
__( 'Submit a bug', 'woocommerce-paypal-payments' )
),
)
);
},
10,
2
);
/**
* Check if WooCommerce is active.
*